mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 05:09:35 +00:00
Fix skew test for release candidates (#11972)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
This commit is contained in:
@@ -62,12 +62,12 @@ var _ = Describe("Skew Tests", Ordered, func() {
|
||||
for _, server := range config.Servers {
|
||||
out, err := server.RunCmdOnNode("k3s --version")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1
|
||||
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1 or rancher/k3s:v1.20.0-rc1-k3s1
|
||||
cVersion := strings.Split(*k3sImage, ":")[1]
|
||||
cVersion = strings.Replace(cVersion, "-amd64", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-arm64", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-arm", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-", "+", 1)
|
||||
cVersion = strings.Replace(cVersion, "-k3s", "+k3s", 1)
|
||||
Expect(out).To(ContainSubstring(cVersion))
|
||||
}
|
||||
for _, agent := range config.Agents {
|
||||
@@ -114,12 +114,12 @@ var _ = Describe("Skew Tests", Ordered, func() {
|
||||
for _, server := range config.Servers[1:] {
|
||||
out, err := server.RunCmdOnNode("k3s --version")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1-amd64
|
||||
// The k3s image is in the format rancher/k3s:v1.20.0-k3s1-amd64 or rancher/k3s:v1.20.0-rc1-k3s1-amd64
|
||||
cVersion := strings.Split(*k3sImage, ":")[1]
|
||||
cVersion = strings.Replace(cVersion, "-amd64", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-arm64", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-arm", "", 1)
|
||||
cVersion = strings.Replace(cVersion, "-", "+", 1)
|
||||
cVersion = strings.Replace(cVersion, "-k3s", "+k3s", 1)
|
||||
Expect(out).To(ContainSubstring(cVersion))
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user