Skip to content

Commit

Permalink
Make sure to not overlap with the already existing channel and use RT…
Browse files Browse the repository at this point in the history
… for tests

Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Oct 25, 2023
1 parent 782f57c commit c5461a2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/e2e/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ import (
"github.com/rancher/elemental-operator/tests/catalog"
)

const channelImage = `"registry.suse.com/rancher/elemental-teal-channel:1.3.4"`
// We are using the RT channel not to overlap with the default one
const channelImage = `"registry.suse.com/rancher/elemental-teal-rt-channel:1.3.4"`

func getPlan(s string) (up *upgradev1.Plan, err error) {
up = &upgradev1.Plan{}
Expand Down Expand Up @@ -238,7 +239,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", func() {
)
defer k.Delete("managedosversionchannel", "-n", fleetNamespace, "testchannel3")

waitTestChannelPopulate(k, mr, "testchannel3", "registry.suse.com/rancher/elemental-teal/5.4", "1.2.2")
waitTestChannelPopulate(k, mr, "testchannel3", "registry.suse.com/rancher/elemental-teal-rt/5.4:1.2.2", "v1.2.2-rt")

err := k.ApplyJSON("", osImage, catalog.NewManagedOSImage(
fleetNamespace,
Expand All @@ -251,9 +252,9 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", func() {

checkUpgradePod(k,
And(
ContainElement("METADATA_UPGRADEIMAGE=registry.suse.com/rancher/elemental-teal/5.4:1.2.2"),
ContainElement("METADATA_UPGRADEIMAGE=registry.suse.com/rancher/elemental-teal-rt/5.4:1.2.2"),
),
Equal("registry.suse.com/rancher/elemental-teal/5.4:1.2.2"),
Equal("registry.suse.com/rancher/elemental-teal-rt/5.4:1.2.2"),
Equal([]string{"/usr/sbin/suc-upgrade"}),
BeNil(),
And(
Expand All @@ -279,7 +280,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", func() {
)
defer k.Delete("managedosversionchannel", "-n", fleetNamespace, "testchannel4")

waitTestChannelPopulate(k, mr, "testchannel4", "registry.suse.com/rancher/elemental-teal/5.4", "1.2.2")
waitTestChannelPopulate(k, mr, "testchannel4", "registry.suse.com/rancher/elemental-teal-rt/5.4:1.2.2", "v1.2.2-rt")

err := k.ApplyJSON("", osImage, catalog.NewManagedOSImage(
fleetNamespace,
Expand Down

0 comments on commit c5461a2

Please sign in to comment.