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
Run subtests #10862
Run subtests #10862
Conversation
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.
Awesome changes! :-)
QA:
-l depends on placement in the cmd line:
fails: cd tests && ./main.sh deploy run_deploy_bundle -l tuesday-lxd
succeeds: cd tests && ./main.sh -l tuesday-lxd deploy run_deploy_bundle
and on the controller being the current one.
echo "" | ||
echo " $(green 'cmd -h') Display this help message" | ||
echo " $(green 'cmd -v') Verbose and debug messages" | ||
echo " $(green 'cmd -V') Very verbose and debug messages" | ||
echo " $(green 'cmd -s') Skip tests using a comma seperated list" | ||
echo " $(green 'cmd -a') Create an atifact file" | ||
echo " $(green 'cmd -x') Output file from streaming the output" | ||
echo " $(green 'cmd -r') Reuse bootstrapped controller" | ||
echo " $(green 'cmd -r') Reuse bootstrapped controller between testing suites" |
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.
👍
To run the tests, they can be broken down into steps: | ||
|
||
```sh | ||
./main.sh deploy # Runs deploy test suite |
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 it "cd tests && ./main.sh deploy"? Maybe it's just me, but if I read this, I'll never remember the "cd tests &&" part. And tests will fail due to pathing issues.
} | ||
``` | ||
|
||
## Exit codes / Success |
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.
👍
Every person seems to hit the same issue, in that they attempt to run a subtest directly. This wasn't originally the main idea, instead they where meant to run the test that runs the subtests and then see if they broke anything whilst doing that. I've been persuaded otherwise, a subtest should be able be run as you want to iterate hard on that and instead of blocking people from doing fast iterations we should enable it. ---- Improved the documentation around the test setup.
Add the change directory before running main.sh
When reusing a local controller, ensure that we update the bootstrap provider.
Remove the ability to run all tests suites as default. This prevents mistakes when attempting to run the test suites and causes the bootstrap of juju in substraits that can be expensive. To prevent the feature from being removed completely, we've enabled -A, which allows the developer to say, they know what they're doing.
We encounter issues where we depend on the order of the keys in an object to be sort and sane. This does this.
This allows the test to handle localhost as lxd
ac4ad33
to
6e63b5b
Compare
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.
I can use my localhost controller to run tests now. Ran into some issues not directly related to this change, so I haven't been able to run the full set of tests.
Great updates! Thank you.
|
Description of change
Every person seems to hit the same issue, in that they attempt to run
a subtest directly. This wasn't originally the main idea, instead they
where meant to run the test that runs the subtests and then see if they
broke anything whilst doing that.
I've been persuaded otherwise, a subtest should be able be run as you
want to iterate hard on that and instead of blocking people from doing
fast iterations we should enable it.
QA steps