mirror of
https://github.com/k3s-io/k3s.git
synced 2026-06-11 01:44:08 -04:00
Fix skew test for release candidates (#11972)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
This commit is contained in:
parent
5e1845b7c1
commit
76c5c770b2
1 changed files with 4 additions and 4 deletions
|
|
@ -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))
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue