Skip to content

CI: Distro from env variable in test in 1.32 - #4910

Merged
louiseschmidtgen merged 1 commit into
1.32from
KU-2736/fix-tests-snapd-1.32
Mar 3, 2025
Merged

CI: Distro from env variable in test in 1.32#4910
louiseschmidtgen merged 1 commit into
1.32from
KU-2736/fix-tests-snapd-1.32

Conversation

@ktsakalozos

Copy link
Copy Markdown
Contributor

Summary

We would like to switch to use Ubuntu 20.04 in our tests. This PR fixes some tests that had the ubuntu distro hard coded.

Tests passing in https://jenkins.canonical.com/k8s-ps5/job/release-microk8s-arch-amd64/node=runner-cloud/534/console

@ktsakalozos
ktsakalozos force-pushed the KU-2736/fix-tests-snapd-1.32 branch from 0adc53e to 86fd109 Compare March 1, 2025 08:10
@ktsakalozos
ktsakalozos force-pushed the KU-2736/fix-tests-snapd-1.32 branch from 86fd109 to 8b70551 Compare March 1, 2025 14:16

@louiseschmidtgen louiseschmidtgen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@louiseschmidtgen louiseschmidtgen changed the title Distro from env variable in test in 1.32 Mar 3, 2025
@louiseschmidtgen
louiseschmidtgen merged commit 941f26d into 1.32 Mar 3, 2025
@louiseschmidtgen
louiseschmidtgen deleted the KU-2736/fix-tests-snapd-1.32 branch March 3, 2025 06:51
louiseschmidtgen added a commit that referenced this pull request Mar 10, 2025
…st (#4910) (#4923)  (#4914)

* CI: Distro from env variable in test (#4910)

* CI: Pins pytest to 8.3.4 for Test core addons (#4923)

Currently, the "Test core addons" job fails because the test_cis test
fails, having 2 more warnings than expected.

Those warnings are from ``microk8s kube-burner``, which has the following
new warnings (the checks were passing before):

```
[WARN] 2.3 Ensure that the --auto-tls argument is not set to true (Automated)
[WARN] 2.6 Ensure that the --peer-auto-tls argument is not set to true (Automated)
``

Those warnings appear because the commands used for checking them fail:

```
2.3 audit test did not run: failed to run: "/bin/ps -ef | /bin/grep k8s-dqlite | /bin/grep -v grep", output: "", error: exit status 1
2.6 audit test did not run: failed to run: "/bin/ps -ef | /bin/grep k8s-dqlite | /bin/grep -v grep", output: "", error: exit status 1
```

Those errors would suggest that there is no ``k8s-dqlite`` process running
on the node... but it should. In ``test_cis``, after enabling
``cis-hardening`` (``microk8s enable cis-hardening``) and before running
``microk8s kube-burner``, in the test we're waiting for Kubernetes to be
available, accesible, and ready (``wait_for_installation``), which would only
be possible if ``k8s-dqlite`` would be running. What's more, this issue
does not occur when manually running the exact same commands as in the
GitHub action, even on the same GitHub Runners.

Pinning pytest to 8.3.4 seems to be solving the issue above (8.3.5 was released
a few days ago).

* use pytest 8.3.4 in lxc install-deps

---------

Co-authored-by: Konstantinos Tsakalozos <konstantinos.tsakalozos@canonical.com>
Co-authored-by: Claudiu Belu <claudiu.belu@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants