Move test resource setup from Python to Typescript#2438
Move test resource setup from Python to Typescript#2438SylvainSenechal wants to merge 2 commits into
Conversation
Hello sylvainsenechal,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
36a43c8 to
352b2fb
Compare
There was a problem hiding this comment.
this one is completely removed, was not used
9f459d7 to
593dbfd
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
22104b7 to
f69ac66
Compare
f69ac66 to
e635bbf
Compare
There was a problem hiding this comment.
General thought : Not addressed in this pr, but wondering if some of these setup (no just this file, whole resources setup) could be done in simpler before hook from within the tests
I guess for some things like locations, it's not advisable because of reconciliation, or even not possible maybe for accounts that we wanna create before anything ?
But maybe for buckets creation its possible (not even sure as some/all of these buckets are the buckets of the locations)
e635bbf to
c4ddaf7
Compare
|
|
||
| const versionedBucket = env.RING_S3C_INGESTION_SRC_BUCKET_NAME; | ||
| const nonVersionedBucket = env.RING_S3C_INGESTION_SRC_NON_VERSIONED_BUCKET_NAME; | ||
| const objectCount = env.RING_S3C_INGESTION_NON_VERSIONED_OBJECT_COUNT_PER_TYPE ?? 0; |
There was a problem hiding this comment.
Behavioral regression: the Python original validated this env var was set (would throw on missing). It now silently defaults to 0, skipping pre-population entirely.
|
|
||
| export function loadConfig(configFile: string): E2EConfig { | ||
| const content = fs.readFileSync(configFile, 'utf8'); | ||
| return yaml.load(content) as E2EConfig; |
There was a problem hiding this comment.
Behavioral regression: the Python original validated this config against a JSON schema. The as E2EConfig cast does no runtime validation, so a malformed resources.yaml crashes later with a cryptic undefined error.
maeldonn
left a comment
There was a problem hiding this comment.
Some regressions. Need to know if it's intentional or not.
Issue: ZENKO-5077
This change wasn't absolutely needed, but it was very cheap and easy to do with Claude, it goes toward aligning the codebase on a single programming language and a single typescript project, to ease future maintenance.
It also open doors for later progressive refactoring of test configuration, as the code is now shared, cucumber/mocha test could directly call functions defined in this configuration folder