Skip to content
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

Merged
merged 7 commits into from Nov 6, 2019
Merged

Run subtests #10862

merged 7 commits into from Nov 6, 2019

Conversation

SimonRichardson
Copy link
Member

@SimonRichardson SimonRichardson commented Nov 5, 2019

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

./main.sh deploy run_deploy_bundle

Copy link
Member

@hmlanigan hmlanigan left a 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.

https://pastebin.canonical.com/p/34BTTnNchr/

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"
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

@hmlanigan hmlanigan left a 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.

@SimonRichardson
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit 57785b8 into juju:develop Nov 6, 2019
@SimonRichardson SimonRichardson deleted the run_subtests branch July 12, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants