Skip to content

Commit b35aa53

Browse files
authored
test with Debian 11 (#697)
1 parent 2fb8418 commit b35aa53

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/pull-request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ jobs:
187187
test:
188188
- TestSingleNodeInstallation
189189
- TestSingleNodeInstallationAlmaLinux8
190+
- TestSingleNodeInstallationDebian11
190191
- TestSingleNodeInstallationDebian12
191192
- TestSingleNodeInstallationCentos9Stream
192193
- TestVersion

.github/workflows/release-dev.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
test:
141141
- TestSingleNodeInstallation
142142
- TestSingleNodeInstallationAlmaLinux8
143+
- TestSingleNodeInstallationDebian11
143144
- TestSingleNodeInstallationDebian12
144145
- TestSingleNodeInstallationCentos9Stream
145146
- TestVersion

e2e/install_test.go

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,54 @@ func TestSingleNodeInstallationDebian12(t *testing.T) {
143143
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
144144
}
145145

146+
func TestSingleNodeInstallationDebian11(t *testing.T) {
147+
t.Parallel()
148+
tc := cluster.NewTestCluster(&cluster.Input{
149+
T: t,
150+
Nodes: 1,
151+
Image: "debian/11",
152+
LicensePath: "license.yaml",
153+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
154+
})
155+
defer cleanupCluster(t, tc)
156+
157+
t.Logf("%s: installing test dependencies on node 0", time.Now().Format(time.RFC3339))
158+
commands := [][]string{
159+
{"apt-get", "update", "-y"},
160+
{"apt-get", "install", "ca-certificates", "curl", "-y"},
161+
{"update-ca-certificates"},
162+
}
163+
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
164+
t.Fatalf("fail to install ssh on node 0: %v", err)
165+
}
166+
167+
t.Logf("%s: installing embedded-cluster on node 0", time.Now().Format(time.RFC3339))
168+
line := []string{"single-node-install.sh", "cli"}
169+
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
170+
t.Fatalf("fail to install embedded-cluster on node %s: %v", tc.Nodes[0], err)
171+
}
172+
173+
t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339))
174+
line = []string{"check-installation-state.sh", os.Getenv("SHORT_SHA")}
175+
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
176+
t.Fatalf("fail to check installation state: %v", err)
177+
}
178+
179+
t.Logf("%s: running kots upstream upgrade", time.Now().Format(time.RFC3339))
180+
line = []string{"kots-upstream-upgrade.sh", os.Getenv("SHORT_SHA")}
181+
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
182+
t.Fatalf("fail to run kots upstream upgrade: %v", err)
183+
}
184+
185+
t.Logf("%s: checking installation state after upgrade", time.Now().Format(time.RFC3339))
186+
line = []string{"check-postupgrade-state.sh"}
187+
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
188+
t.Fatalf("fail to check postupgrade state: %v", err)
189+
}
190+
191+
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
192+
}
193+
146194
func TestSingleNodeInstallationCentos9Stream(t *testing.T) {
147195
t.Parallel()
148196
tc := cluster.NewTestCluster(&cluster.Input{

0 commit comments

Comments
 (0)