Show a root install command without sudo for Proxmox VE hosts
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -165,7 +165,7 @@ test('shows the execution stop and prepares the Windows restart through a versio
|
||||
expect(writes).toHaveLength(2);
|
||||
});
|
||||
|
||||
test('offers one Linux command for x86-64 and ARM64 and keeps the code outside both installer commands', async ({ page }) => {
|
||||
test('offers one Linux command for x86-64 and ARM64, a root command for Proxmox VE and keeps the code outside all installer commands', async ({ page }) => {
|
||||
const token = 'f'.repeat(64), api = '/api/v1/tenants/' + tenantId;
|
||||
const requests: string[] = [];
|
||||
await page.route(origin + '/auth/config', r => r.fulfill({ json: { dev_login_enabled: true, oidc_configured: false, oidc_login_url: null } }));
|
||||
@@ -187,11 +187,16 @@ test('offers one Linux command for x86-64 and ARM64 and keeps the code outside b
|
||||
await enroll.getByRole('button', { name: 'Einmalcode erstellen' }).click();
|
||||
await expect(enroll.getByRole('heading', { name: 'Linux (x86-64 und ARM64)' })).toBeVisible();
|
||||
const commands = enroll.locator('pre');
|
||||
await expect(commands).toHaveCount(2);
|
||||
await expect(commands).toHaveCount(3);
|
||||
await expect(commands.nth(0)).toContainText("&& sudo sh linux.sh 'https://bootstrap.example'");
|
||||
await expect(enroll.getByRole('heading', { name: 'Proxmox VE' })).toBeVisible();
|
||||
await expect(commands.nth(1)).toHaveText("curl --fail --show-error --silent 'https://bootstrap.example/install/linux.sh' -o linux.sh && sh linux.sh 'https://bootstrap.example'");
|
||||
expect((await commands.allTextContents()).join(' ')).not.toMatch(/enable-admin-scripts|EnableAdministratorScripts/);
|
||||
await option.check();
|
||||
await expect(commands.nth(0)).toContainText('--enable-admin-scripts');
|
||||
await expect(commands.nth(1)).toContainText('-EnableAdministratorScripts');
|
||||
await expect(commands.nth(1)).toContainText("sh linux.sh 'https://bootstrap.example' --enable-admin-scripts");
|
||||
await expect(commands.nth(1)).not.toContainText('sudo');
|
||||
await expect(commands.nth(2)).toContainText('-EnableAdministratorScripts');
|
||||
await expect(enroll.getByText(/Für jeden Auftrag gelten zusätzlich/)).toBeVisible();
|
||||
expect((await commands.allTextContents()).join(' ')).not.toContain(token);
|
||||
expect(requests).toEqual([api + '/enrollment-tokens']);
|
||||
|
||||
Reference in New Issue
Block a user