Skip to content

Commit

Permalink
kotsadm 1.116.0 testing (#1130)
Browse files Browse the repository at this point in the history
* updated adminconsole version

* debug failure to join nodes after HA restore

* join controller commands are different on restore

* reenable all tests

---------

Co-authored-by: emosbaugh <[email protected]>
  • Loading branch information
laverya and emosbaugh authored Sep 11, 2024
1 parent 9b4ccf4 commit ae9e4fb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { test, expect } from '@playwright/test';
import { login } from '../shared';

test('get restore join controller command', async ({ page }) => {
await login(page);
await expect(page.locator('#controller-testNodeType')).toBeChecked();
await expect(page.locator('.CodeSnippet-copy')).toBeVisible();
const joinCommand = await page.locator('.react-prism.language-bash').first().textContent();
console.log(`{"command":"${joinCommand}"}`);
});
22 changes: 18 additions & 4 deletions e2e/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ func TestSingleNodeDisasterRecovery(t *testing.T) {
t.Fatalf("fail to check installation state: %v", err)
}

appUpgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
testArgs = []string{appUpgradeVersion}

t.Logf("%s: upgrading cluster", time.Now().Format(time.RFC3339))
if _, _, err := runPlaywrightTest(t, tc, "deploy-upgrade", testArgs...); err != nil {
t.Fatalf("fail to run playwright test deploy-upgrade: %v", err)
}

t.Logf("%s: checking installation state after upgrade", time.Now().Format(time.RFC3339))
line = []string{"check-postupgrade-state.sh", k8sVersion()}
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
t.Fatalf("fail to check postupgrade state: %v", err)
}

t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
}

Expand Down Expand Up @@ -476,7 +490,7 @@ func TestMultiNodeHADisasterRecovery(t *testing.T) {

// join a controller
t.Logf("%s: generating a new controller token command", time.Now().Format(time.RFC3339))
stdout, stderr, err = runPlaywrightTest(t, tc, "get-join-controller-command")
stdout, stderr, err = runPlaywrightTest(t, tc, "get-restore-join-controller-command")
if err != nil {
t.Fatalf("fail to generate controller join token:\nstdout: %s\nstderr: %s", stdout, stderr)
}
Expand All @@ -492,7 +506,7 @@ func TestMultiNodeHADisasterRecovery(t *testing.T) {

// join another controller in non-HA mode
t.Logf("%s: generating a new controller token command", time.Now().Format(time.RFC3339))
stdout, stderr, err = runPlaywrightTest(t, tc, "get-join-controller-command")
stdout, stderr, err = runPlaywrightTest(t, tc, "get-restore-join-controller-command")
if err != nil {
t.Fatalf("fail to generate controller join token:\nstdout: %s\nstderr: %s", stdout, stderr)
}
Expand Down Expand Up @@ -694,7 +708,7 @@ func TestMultiNodeAirgapHADisasterRecovery(t *testing.T) {

// join a controller
t.Logf("%s: generating a new controller token command", time.Now().Format(time.RFC3339))
stdout, stderr, err = runPlaywrightTest(t, tc, "get-join-controller-command")
stdout, stderr, err = runPlaywrightTest(t, tc, "get-restore-join-controller-command")
if err != nil {
t.Fatalf("fail to generate controller join token:\nstdout: %s\nstderr: %s", stdout, stderr)
}
Expand All @@ -710,7 +724,7 @@ func TestMultiNodeAirgapHADisasterRecovery(t *testing.T) {

// join another controller in non-HA mode
t.Logf("%s: generating a new controller token command", time.Now().Format(time.RFC3339))
stdout, stderr, err = runPlaywrightTest(t, tc, "get-join-controller-command")
stdout, stderr, err = runPlaywrightTest(t, tc, "get-restore-join-controller-command")
if err != nil {
t.Fatalf("fail to generate controller join token:\nstdout: %s\nstderr: %s", stdout, stderr)
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/addons/adminconsole/static/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# $ make buildtools
# $ output/bin/buildtools update addon <addon name>
#
version: 1.115.1
version: 1.116.0
location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console
images:
kotsadm:
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm
tag: v1.115.1@sha256:9772a075a24586d2fd8550285f95a0bc466b280e960fd00ccb585ac9999592bb
tag: v1.116.0@sha256:a30c3f825beb5e47d20a1b6717603eee65cf74ece86a7073209b3321c3b807a3
kotsadm-migrations:
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations
tag: v1.115.1@sha256:22673b6d3729fe48607516314f59095b6da8ded4b61aa381c6ada5583f130c5e
tag: v1.116.0@sha256:77fe399c43db11877663e68fd680d764fab7a6d06fc27c82eb0e9a2e4ed9888f
kurl-proxy:
repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy
tag: v1.115.1@sha256:771901bff6459dde393d0df93c1a1ff50c4013dc8264903f89b71d3d10f0b459
tag: v1.116.0@sha256:763c05284f8f824329202d2a71fab1e4bedd19e82ae17c4a694e07e1c166c32f
rqlite:
repo: proxy.replicated.com/anonymous/kotsadm/rqlite
tag: 8.28.1-r0@sha256:f7f9dd7d67999d95d90b8bf26f3508f4f3fcfb89783c7d5abcf94b5aed406ba0
tag: 8.30.0-r0@sha256:794fd99e8c72053c0cb0ad1fdbf1c4af24a8949bd418546952ed9affa6c4e5b6
8 changes: 4 additions & 4 deletions pkg/addons/adminconsole/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#

images:
kotsadm: 'proxy.replicated.com/anonymous/kotsadm/kotsadm:v1.115.1@sha256:9772a075a24586d2fd8550285f95a0bc466b280e960fd00ccb585ac9999592bb'
kurlProxy: 'proxy.replicated.com/anonymous/kotsadm/kurl-proxy:v1.115.1@sha256:771901bff6459dde393d0df93c1a1ff50c4013dc8264903f89b71d3d10f0b459'
migrations: 'proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations:v1.115.1@sha256:22673b6d3729fe48607516314f59095b6da8ded4b61aa381c6ada5583f130c5e'
rqlite: 'proxy.replicated.com/anonymous/kotsadm/rqlite:8.28.1-r0@sha256:f7f9dd7d67999d95d90b8bf26f3508f4f3fcfb89783c7d5abcf94b5aed406ba0'
kotsadm: 'proxy.replicated.com/anonymous/kotsadm/kotsadm:v1.116.0@sha256:a30c3f825beb5e47d20a1b6717603eee65cf74ece86a7073209b3321c3b807a3'
kurlProxy: 'proxy.replicated.com/anonymous/kotsadm/kurl-proxy:v1.116.0@sha256:763c05284f8f824329202d2a71fab1e4bedd19e82ae17c4a694e07e1c166c32f'
migrations: 'proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations:v1.116.0@sha256:77fe399c43db11877663e68fd680d764fab7a6d06fc27c82eb0e9a2e4ed9888f'
rqlite: 'proxy.replicated.com/anonymous/kotsadm/rqlite:8.30.0-r0@sha256:794fd99e8c72053c0cb0ad1fdbf1c4af24a8949bd418546952ed9affa6c4e5b6'
isHA: false
isHelmManaged: false
kurlProxy:
Expand Down

0 comments on commit ae9e4fb

Please sign in to comment.