You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(integ-runner): catch snapshot errors, treat --from-file as command-line (#20523)
Snapshot errors
---------------
The constructor of `IntegSnapshotRunner` calls `loadManifest()`, which
on my computer happened to fail and stopped the entire test suite
because this error happened outside the `try/catch` block. Same for
the integ runner itself.
Move it inside the try/catch block, needed a bit of refactoring to
make sure we could still get at the test name.
`--from-file`
-------------
Instead of having `--from-file` require a JSON file with its own
structure, interpret it as a text file which gets treated exactly
the same as the `[TEST [..]]` arguments on the command line.
This still allows for the `--exclude` behavior by setting that flag
on the command-line.
Also be very liberal on the pattern (file name or test name or display
name) that we accept, encoded in the `IntegTest.matches()` class.
Refactoring
-----------
Moved the logic around determining test names and directories into a
class (`IntegTest`) which is a convenience class on top of a static data
record (`IntegTestInfo`). The split between data and logic is so that we
can pass the data to worker threads where we can hydrate the helper
class on top again. I tried to be consistent: in memory, all the fields are
with respect to `process.cwd()`, so valid file paths in the current
process. Only when they are passed to the CLI wrapper are the paths
made relative to the CLI wrapper directory.
Print snapshot validations that are running for a long time (1 minute).
This helps diagnose what is stuck, if anything is. On my machine, it
was tests using Docker because there was some issue with it, and this
lost me a day. Also change the test reporting formatting slightly.
--------------
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
.options('directory',{type: 'string',default: 'test',desc: 'starting directory to discover integration tests. Tests will be discovered recursively from this directory'})
26
27
.options('profiles',{type: 'array',desc: 'list of AWS profiles to use. Tests will be run in parallel across each profile+regions',nargs: 1,default: []})
27
28
.options('max-workers',{type: 'number',desc: 'The max number of workerpool workers to use when running integration tests in parallel',default: 16})
28
-
.options('exclude',{type: 'boolean',desc: 'All tests should be run, except for the list of tests provided',default: false})
29
-
.options('from-file',{type: 'string',desc: 'Import tests to include or exclude from a file'})
29
+
.options('exclude',{type: 'boolean',desc: 'Run all tests in the directory, except the specified TESTs',default: false})
30
+
.options('from-file',{type: 'string',desc: 'Read TEST names from a file (one TEST per line)'})
30
31
.option('inspect-failures',{type: 'boolean',desc: 'Keep the integ test cloud assembly if a failure occurs for inspection',default: false})
31
32
.option('disable-update-workflow',{type: 'boolean',default: false,desc: 'If this is "true" then the stack update workflow will be disabled'})
32
33
.strict()
@@ -39,7 +40,7 @@ async function main() {
39
40
// list of integration tests that will be executed
0 commit comments