Skip to content

Commit 5f0c200

Browse files
authored
fix skew test container version (#11991)
Signed-off-by: Brooks Newberry <[email protected]>
1 parent f5921ea commit 5f0c200

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/docker/skew/skew_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ var _ = Describe("Skew Tests", Ordered, func() {
6161
for _, server := range config.Servers {
6262
out, err := server.RunCmdOnNode("k3s --version")
6363
Expect(err).NotTo(HaveOccurred())
64-
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1
64+
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1 or rancher/k3s:v1.20.0-rc1-k3s1
6565
cVersion := strings.Split(*k3sImage, ":")[1]
6666
cVersion = strings.Replace(cVersion, "-amd64", "", 1)
6767
cVersion = strings.Replace(cVersion, "-arm64", "", 1)
6868
cVersion = strings.Replace(cVersion, "-arm", "", 1)
69-
cVersion = strings.Replace(cVersion, "-", "+", 1)
69+
cVersion = strings.Replace(cVersion, "-k3s", "+k3s", 1)
7070
Expect(out).To(ContainSubstring(cVersion))
7171
}
7272
for _, agent := range config.Agents {
@@ -113,12 +113,12 @@ var _ = Describe("Skew Tests", Ordered, func() {
113113
for _, server := range config.Servers[1:] {
114114
out, err := server.RunCmdOnNode("k3s --version")
115115
Expect(err).NotTo(HaveOccurred())
116-
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1-amd64
116+
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1-amd64 or rancher/k3s:v1.20.0-rc1-k3s1-amd64
117117
cVersion := strings.Split(*k3sImage, ":")[1]
118118
cVersion = strings.Replace(cVersion, "-amd64", "", 1)
119119
cVersion = strings.Replace(cVersion, "-arm64", "", 1)
120120
cVersion = strings.Replace(cVersion, "-arm", "", 1)
121-
cVersion = strings.Replace(cVersion, "-", "+", 1)
121+
cVersion = strings.Replace(cVersion, "-k3s", "+k3s", 1)
122122
Expect(out).To(ContainSubstring(cVersion))
123123
}
124124
})

0 commit comments

Comments
 (0)