Skip to content

Commit

Permalink
MINOR: Fix Redshift DBT Playwright (#18642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 authored Nov 14, 2024
1 parent 976ad98 commit 8104c3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,11 @@ export const POSTGRES = {

export const MYSQL = 'Mysql';

export const HTTP_CONFIG_SOURCE = {
DBT_CATALOG_HTTP_PATH:
'https://raw.githubusercontent.com/OnkarVO7/dbt_git_test/dbt_aut/catalog.json',
DBT_MANIFEST_HTTP_PATH:
'https://raw.githubusercontent.com/OnkarVO7/dbt_git_test/dbt_aut/manifest.json',
DBT_RUN_RESULTS_FILE_PATH:
'https://raw.githubusercontent.com/OnkarVO7/dbt_git_test/dbt_aut/run_results.json',
};

export const DBT = {
classification: 'dbtTags',
awsRegion: 'us-east-2',
s3BucketName: 'awsdatalake-testing',
s3Prefix: 'dbt-testing/mayur/',
tagName: 'model_tag_two',
dbtQuery: 'select * from "dev"."dbt_automate_upgrade_tests"."stg_orders"',
dbtLineageNodeLabel: 'customers',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
PlaywrightWorkerArgs,
TestType,
} from '@playwright/test';
import { DBT, HTTP_CONFIG_SOURCE, REDSHIFT } from '../../../constant/service';
import { DBT, REDSHIFT } from '../../../constant/service';
import { SidebarItem } from '../../../constant/sidebar';
import {
getApiContext,
Expand Down Expand Up @@ -115,19 +115,27 @@ class RedshiftWithDBTIngestionClass extends ServiceBaseClass {
await page.waitForSelector('#root\\/dbtConfigSource__oneof_select');
await page.selectOption(
'#root\\/dbtConfigSource__oneof_select',
'DBT HTTP Config'
'DBT S3 Config'
);
await page.fill(
'#root\\/dbtConfigSource\\/dbtCatalogHttpPath',
HTTP_CONFIG_SOURCE.DBT_CATALOG_HTTP_PATH
'#root\\/dbtConfigSource\\/dbtSecurityConfig\\/awsAccessKeyId',
process.env.PLAYWRIGHT_S3_STORAGE_ACCESS_KEY_ID ?? ''
);
await page.fill(
'#root\\/dbtConfigSource\\/dbtManifestHttpPath',
HTTP_CONFIG_SOURCE.DBT_MANIFEST_HTTP_PATH
'#root\\/dbtConfigSource\\/dbtSecurityConfig\\/awsSecretAccessKey',
process.env.PLAYWRIGHT_S3_STORAGE_SECRET_ACCESS_KEY ?? ''
);
await page.fill(
'#root\\/dbtConfigSource\\/dbtRunResultsHttpPath',
HTTP_CONFIG_SOURCE.DBT_RUN_RESULTS_FILE_PATH
'#root\\/dbtConfigSource\\/dbtSecurityConfig\\/awsRegion',
DBT.awsRegion
);
await page.fill(
'#root\\/dbtConfigSource\\/dbtPrefixConfig\\/dbtBucketName',
DBT.s3BucketName
);
await page.fill(
'#root\\/dbtConfigSource\\/dbtPrefixConfig\\/dbtObjectPrefix',
DBT.s3Prefix
);

await page.click('[data-testid="submit-btn"]');
Expand Down

0 comments on commit 8104c3a

Please sign in to comment.