|
138 | 138 | } |
139 | 139 | }, |
140 | 140 | "project"=> "gdc-us-dev", |
141 | | - "schema"=> "mtt_team_checklist" |
| 141 | + "schema"=> "lcm_test" |
142 | 142 | } |
143 | 143 | }, |
144 | 144 | "input_source"=> { |
145 | 145 | "type"=> "bigquery", |
146 | | - "query"=> "select * from employees;" |
| 146 | + "query"=> "select * from employees order by EmployeeID" |
147 | 147 | } |
148 | 148 | } |
| 149 | + |
149 | 150 | describe 'data helper', :vcr do |
150 | 151 |
|
151 | 152 | it 'connect to redshift with IAM authentication' do |
152 | 153 | data_helper = GoodData::Helpers::DataSource.new(iam_params['input_source']) |
153 | 154 | file_path = data_helper.realize(iam_params) |
| 155 | + puts "redshift iam: #{file_path}" |
154 | 156 | data = File.open('spec/data/redshift_data2.csv').read |
155 | 157 | expect(data).to eq File.open(file_path).read |
156 | 158 | end |
157 | 159 |
|
158 | 160 | it 'connect to redshift with BASIC authentication' do |
159 | 161 | data_helper = GoodData::Helpers::DataSource.new(basic_params['input_source']) |
160 | 162 | file_path = data_helper.realize(basic_params) |
| 163 | + puts "redshift basic 1: #{file_path}" |
161 | 164 | data = File.open('spec/data/redshift_data2.csv').read |
162 | 165 | expect(data).to eq File.open(file_path).read |
163 | 166 | end |
164 | 167 |
|
165 | 168 | it 'connect to redshift with BASIC authentication without schema' do |
166 | 169 | data_helper = GoodData::Helpers::DataSource.new(basic_params_without_schema['input_source']) |
167 | 170 | file_path = data_helper.realize(basic_params_without_schema) |
| 171 | + puts "redshift basic 2: #{file_path}" |
168 | 172 | data = File.open('spec/data/redshift_data.csv').read |
169 | 173 | expect(data).to eq File.open(file_path).read |
170 | 174 | end |
171 | 175 |
|
172 | 176 | it 'connect to redshift with BASIC authentication and dynamic source' do |
173 | 177 | data_helper = GoodData::Helpers::DataSource.new(basic_params_dynamic_source['dynamic_params']['input_source']) |
174 | 178 | file_path = data_helper.realize(basic_params_dynamic_source) |
| 179 | + puts "redshift basic 3: #{file_path}" |
175 | 180 | data = File.open('spec/data/redshift_data2.csv').read |
176 | 181 | expect(data).to eq File.open(file_path).read |
177 | 182 | end |
178 | 183 |
|
179 | 184 | it 'connect to redshift with BASIC authentication and url has parameter' do |
180 | 185 | data_helper = GoodData::Helpers::DataSource.new(basic_params_url_parameters['input_source']) |
181 | 186 | file_path = data_helper.realize(basic_params_url_parameters) |
| 187 | + puts "redshift basic 4: #{file_path}" |
182 | 188 | data = File.open('spec/data/redshift_data2.csv').read |
183 | 189 | expect(data).to eq File.open(file_path).read |
184 | 190 | end |
185 | 191 |
|
186 | 192 | it 'connect to snowflake with BASIC authentication' do |
187 | 193 | data_helper = GoodData::Helpers::DataSource.new(snowflake_basic_params['input_source']) |
188 | 194 | file_path = data_helper.realize(snowflake_basic_params) |
| 195 | + puts "snowflake: #{file_path}" |
189 | 196 | data = File.open('spec/data/snowflake_data.csv').read |
190 | 197 | expect(data).to eq File.open(file_path).read |
191 | 198 | end |
|
198 | 205 |
|
199 | 206 | data_helper = GoodData::Helpers::DataSource.new(bigquery_basic_params['input_source']) |
200 | 207 | file_path = data_helper.realize(bigquery_basic_params) |
| 208 | + puts "bigquery: #{file_path}" |
201 | 209 | data = File.open('spec/data/bigquery_data.csv').read |
202 | 210 | expect(data).to eq File.open(file_path).read |
203 | 211 | end |
|
0 commit comments