-
Notifications
You must be signed in to change notification settings - Fork 931
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
Add workflow to run e2e tests from lxd-ui #14035
base: main
Are you sure you want to change the base?
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.
Hi @edlerd please can you work with @simondeziel to update this to use the pre-built LXD binaries we now have (that are compiled during the Code Tests phase) and to use the re-usable workflows for performance tuning and dependency installation.
Also i'd like to avoid building the docs twice, but they are built into the tarball i believe during the Code Tests phase so may be available already now.
405477c
to
3c2137b
Compare
Signed-off-by: David Edler <[email protected]>
Signed-off-by: David Edler <[email protected]>
3c2137b
to
6f73c2c
Compare
Signed-off-by: David Edler <[email protected]>
6644bf5
to
29fc92e
Compare
Signed-off-by: David Edler <[email protected]>
6f77ba3
to
df58339
Compare
@simondeziel @tomponline Updated the workflow to consume the build artefacts from previous steps. Please give it another review. |
Also using the docs artefact by depending and downloading on that build step. |
LXD_OIDC_ISSUER: "https://dev-xjrvvfikbsv4jxn7.us.auth0.com/" | ||
LXD_OIDC_AUDIENCE: "https://dev-xjrvvfikbsv4jxn7.us.auth0.com/api/v2/" | ||
LXD_OIDC_USER: "[email protected]" | ||
LXD_OIDC_PASSWORD: "lxd-ui-e2e-password" |
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 shouldnt be hardcoded into the test file, as it references an external service, and thus is a real password.
We should now change this password to something else and then securely transfer it to me so we can set it up as a GH secret.
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 is a dedicated free account, specially created for e2e tests. It is expected to be public. I don't see a reason for this to be kept secret.
Though once we start using the local OIDC service, we can remove this.
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.
Hrm, yeah, but we shouldnt be making the credentials public
@@ -494,6 +494,240 @@ jobs: | |||
name: lxd-clients-${{ runner.os }} | |||
path: bin/ | |||
|
|||
ui: |
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.
please can you move this as part of the system-tests:
workflow and make it a step after name: "Run system tests (${{ matrix.suite }}, ${{ matrix.backend }})"
and before name: Upload coverage data
Then we can re-use the dependency install deps, and by ensuring LXD is run with the code coverage env var, we can collect coverage data from the UI tests too.
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 will slow down LXD test runtime. With current changes from this PR, the UI tests run in parallel to the system tests, which will not affect your total runtime. Because system tests take longer than the UI tests. I think a better option is to also record coverage in the UI step and download both coverage reports in the TICS step.
Signed-off-by: David Edler <[email protected]>
df58339
to
cb3f958
Compare
env: | ||
ENVIRONMENT: devel | ||
PORT: 8407 | ||
LXD_UI_BACKEND_IP: 172.17.0.1 |
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.
Could that be one of the loopback IPs instead?
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.
The ui is is running in a container, so we need to use this to reach out from the container that is running the ui. Loopback would be inside the container and not reach lxd which runs on the host.
Signed-off-by: David Edler <[email protected]>
Signed-off-by: David Edler <[email protected]>
Signed-off-by: David Edler <[email protected]>
…dopted to not rely on it Signed-off-by: David Edler <[email protected]>
Signed-off-by: David Edler <[email protected]>
Added a step to the GitHub test workflow, executing the e2e test suite from lxd-ui with a lxd backend built from the current branch from a PR or main branch.
We might extend this on the stable-5.21 and stable-5.0 branches, as we have dedicated test suites in lxd-ui for those. For older versions, we should continue skipping the e2e tests. I'd keep this as a second step in a followup PR.
This was successful on a fork, i.e. see this run.