Skip to content

Commit 9d1ec8d

Browse files
authored
fix(ci): e2e app airgap restore image pull backoff (#1842)
1 parent 6e3edc4 commit 9d1ec8d

File tree

13 files changed

+106
-31
lines changed

13 files changed

+106
-31
lines changed

cmd/installer/cli/testing/assets/release-restore-newdr/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
- init:
1818
initContainers:
1919
- name: restore-hook-init1
20-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
20+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2121
command:
2222
- /bin/ash
2323
- -c

e2e/kots-release-install-failing-preflights/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- init:
2121
initContainers:
2222
- name: restore-hook-init1
23-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
23+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2424
command:
2525
- /bin/ash
2626
- -c

e2e/kots-release-install-warning-preflights/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- init:
2121
initContainers:
2222
- name: restore-hook-init1
23-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
23+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2424
command:
2525
- /bin/ash
2626
- -c

e2e/kots-release-install/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- init:
2121
initContainers:
2222
- name: restore-hook-init1
23-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
23+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2424
command:
2525
- /bin/ash
2626
- -c

e2e/kots-release-unsupported-overrides/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- init:
2121
initContainers:
2222
- name: restore-hook-init1
23-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
23+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2424
command:
2525
- /bin/ash
2626
- -c

e2e/kots-release-upgrade/restore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- init:
2121
initContainers:
2222
- name: restore-hook-init1
23-
image: proxy.replicated.com/anonymous/nginx:1.24-alpine
23+
image: 'repl{{ LocalImageName "proxy.replicated.com/anonymous/nginx:1.24-alpine" }}'
2424
command:
2525
- /bin/ash
2626
- -c

e2e/playwright/tests/deploy-upgrade/test.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect, Page, FrameLocator } from '@playwright/test';
2-
import { login } from '../shared';
2+
import { login, vaidateAppAndClusterReady } from '../shared';
33

44
test('deploy upgrade', async ({ page }) => {
55
test.setTimeout(15 * 60 * 1000); // 15 minutes
@@ -59,7 +59,5 @@ async function verifyUpgradeSuccess(page: Page) {
5959
await expect(page.locator('.VersionHistoryRow', { hasText: process.env.APP_UPGRADE_VERSION })).toContainText('Currently deployed version', { timeout: 90 * 1000 });
6060
await page.getByRole('link', { name: 'Dashboard', exact: true }).click();
6161
await expect(page.locator('.VersionCard-content--wrapper')).toContainText(process.env.APP_UPGRADE_VERSION);
62-
await expect(page.locator('#app')).toContainText('Currently deployed version');
63-
await expect(page.locator('#app')).toContainText('Ready', { timeout: 30 * 1000 });
64-
await expect(page.locator('#app')).toContainText('Up to date');
62+
await vaidateAppAndClusterReady(page, expect, 10 * 1000);
6563
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Page, Expect } from '@playwright/test';
2+
3+
export const vaidateAppAndClusterReady = async (page: Page, expect: Expect, initialTimeout: number) => {
4+
await page.getByRole('link', { name: 'Dashboard', exact: true }).click();
5+
await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: initialTimeout });
6+
await expect(page.locator('#app')).toContainText('Ready', { timeout: 45000 });
7+
await expect(page.locator('#app')).toContainText('Up to date');
8+
};

e2e/playwright/tests/shared/deploy-app.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Page, Expect } from '@playwright/test';
2+
import { vaidateAppAndClusterReady } from '.';
23

34
export const deployApp = async (page: Page, expect: Expect) => {
45
await expect(page.getByText('Optionally add nodes to the cluster'),).toBeVisible();
@@ -16,7 +17,5 @@ export const deployApp = async (page: Page, expect: Expect) => {
1617
await expect(page.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
1718
await expect(page.locator('#app')).toContainText('The Volume Snapshots CRD exists');
1819
await page.getByRole('button', { name: 'Deploy' }).click();
19-
await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 90000 });
20-
await expect(page.locator('#app')).toContainText('Ready', { timeout: 45000 });
21-
await expect(page.locator('#app')).toContainText('Up to date');
20+
await vaidateAppAndClusterReady(page, expect, 90000);
2221
};
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Page, Expect } from '@playwright/test';
2+
import { vaidateAppAndClusterReady } from '.';
23

34
export const deployEC18AppVersion = async (page: Page, expect: Expect) => {
4-
await expect(page.getByRole('button', { name: 'Add node', exact: true })).toBeVisible();
5-
await page.getByRole('button', { name: 'Continue' }).click();
6-
await expect(page.locator('h3')).toContainText('The First Config Group');
7-
await page.locator('input[type="text"]').click();
8-
await page.locator('input[type="text"]').fill('initial-hostname.com');
9-
await page.locator('input[type="password"]').click();
10-
await page.locator('input[type="password"]').fill('password');
11-
await page.getByRole('button', { name: 'Continue' }).click();
12-
await expect(page.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
13-
await expect(page.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
14-
await expect(page.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
15-
await expect(page.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
16-
await page.getByRole('button', { name: 'Deploy' }).click();
17-
await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 90000 });
18-
await expect(page.locator('#app')).toContainText('Ready', { timeout: 45000 });
19-
await expect(page.locator('#app')).toContainText('Up to date');
20-
};
5+
await expect(page.getByRole('button', { name: 'Add node', exact: true })).toBeVisible();
6+
await page.getByRole('button', { name: 'Continue' }).click();
7+
await expect(page.locator('h3')).toContainText('The First Config Group');
8+
await page.locator('input[type="text"]').click();
9+
await page.locator('input[type="text"]').fill('initial-hostname.com');
10+
await page.locator('input[type="password"]').click();
11+
await page.locator('input[type="password"]').fill('password');
12+
await page.getByRole('button', { name: 'Continue' }).click();
13+
await expect(page.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
14+
await expect(page.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
15+
await expect(page.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
16+
await expect(page.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
17+
await page.getByRole('button', { name: 'Deploy' }).click();
18+
await vaidateAppAndClusterReady(page, expect, 90000);
19+
};

0 commit comments

Comments
 (0)