-
Notifications
You must be signed in to change notification settings - Fork 244
chore(e2e): refactor smoke-test.ts structure COMPASS-8795 #6602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| run_on: 'ubuntu2004-large', | ||
| depends_on: 'package-ubuntu', | ||
| }, | ||
| // { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing nothing will just fail now if we ever call smoke-test.ts. But we also won't call it until we update functions.yml to call it. So this is just wasteful in the meantime.
.evergreen/functions.yml
Outdated
| eval $(.evergreen/print-compass-env.sh) | ||
| if [[ "$IS_WINDOWS" == "true" ]]; then | ||
| // TODO: windows_setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also just call the smoketest script for each of these TODOs now already because it will only be executed for mac. We'd just have to leave osx_zip out for now.
| .option('package', { | ||
| type: 'string', | ||
| choices: [ | ||
| 'windows_setup', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are based on the naming convention in hadron-build. ie. in theory you can just do ${context.package}_filename to look up the filename for each of them.
| 'linux_deb', | ||
| 'linux_tar', | ||
| 'linux_rpm', | ||
| 'rhel_tar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that the redhat tarball is not named quite like the others because that's how it is inside hadron build already.
| }); | ||
|
|
||
| type SmokeTestsContext = ReturnType<typeof argv['parseSync']>; | ||
| type SmokeTestsContext = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to infer this type from the yargs setup somehow?
| | { filename: string; installer: Installer; updatable: boolean } | ||
| | undefined = undefined; | ||
|
|
||
| if (context.package === 'windows_setup') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be a giant switch case or a hashmap to map these things or pluggable or.. I don't personally have a preference.
kraenhansen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff 👍
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
Co-authored-by: Kræn Hansen <kraen.hansen@mongodb.com>
We spoke about this and I need some amount of structure in place before we add the autoupdate tests. Would be nice to try and get it out of the way ahead of time so we don't have unnecessary merge conflicts.
This reduces the amount of parameters it takes considerably while still fitting in with our evergreen setup. The parameters we're left with are modelled after how hadron-build info works so we can still use that to calculate all the metadata we need, especially the relevant filenames. It should be a little bit simpler to use / work in locally too.
There's also a one-to-one relation between the script being invoked and which "package" (ie. osx_dmg) gets tested. I think it simplifies things a bit and makes it a bit simpler to work on locally.