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

fix: setup lxd with group "lxd" in GH actions #1096

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
uses: canonical/[email protected]
with:
channel: ${{ matrix.lxd_channel }}
group: lxd

- name: Setup LXD
shell: bash
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
- name: Setup for tests
if: ${{ matrix.lxd_channel != '5.0/edge' }}
shell: bash
run: ./tests/scripts/setup_test
run: sudo -E ./tests/scripts/setup_test

- name: Run Playwright tests
run: npx playwright test --project ${{ matrix.browser }}:lxd-${{ steps.lxd-env.outputs.LXD_CHANNEL }}
Expand Down
6 changes: 3 additions & 3 deletions tests/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ test("login", async ({ page }, testInfo) => {
test.skip(!testInfo.project.name.includes("login"));
// remove tls certificate from trust store so we can test oidc login
const fingerprint = execSync(
"lxc config trust list | grep lxd-ui.crt | awk '{print $8}'",
"sudo lxc config trust list | grep lxd-ui.crt | awk '{print $8}'",
).toString();
execSync(`lxc config trust remove ${fingerprint}`);
execSync(`sudo lxc config trust remove ${fingerprint}`);

await gotoURL(page, "/ui/");
await loginUser(page);
await page.getByText("Log out").click();

// add tls certificate to trust store so rest of tests can run correctly
execSync("lxc config trust add keys/lxd-ui.crt");
execSync("sudo lxc config trust add keys/lxd-ui.crt");
});