Skip to content

Commit

Permalink
Make test more verbose
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
  • Loading branch information
anmazzotti committed Sep 25, 2024
1 parent 3b89d81 commit 26f4a73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/e2e/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func upgradePod(k *kubectl.Kubectl) string {
}

func checkUpgradePod(k *kubectl.Kubectl, env, image, command, args, mm types.GomegaMatcher) {
By("checking upgrade pod")
// Wait for the upgrade pod to appear
k.EventuallyPodMatch(
cattleSystemNamespace,
Expand Down Expand Up @@ -154,6 +155,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", Ordered, func() {
})

createsCorrectPlan := func(meta map[string]runtime.RawExtension, c *upgradev1.ContainerSpec, m types.GomegaMatcher) {
By("creating a new ManagedOSVersion")
ov := catalog.NewManagedOSVersion(
fleetNamespace, osVersion, "v1.0", "0.0.0",
meta,
Expand All @@ -164,6 +166,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", Ordered, func() {
return k.ApplyJSON("", osVersion, ov)
}, 2*time.Minute, 2*time.Second).ShouldNot(HaveOccurred())

By("creating a new ManagedOSImage")
ui := catalog.NewManagedOSImage(
fleetNamespace,
osImage,
Expand All @@ -176,6 +179,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", Ordered, func() {
return k.ApplyJSON("", osImage, ui)
}, 2*time.Minute, 2*time.Second).ShouldNot(HaveOccurred())

By("fetching bundle content")
EventuallyWithOffset(1, func() string {
r, err := kubectl.GetData(fleetNamespace, "bundle", "mos-update-osversion", `jsonpath={.spec.resources[*].content}`)
if err != nil {
Expand All @@ -201,6 +205,7 @@ var _ = Describe("ManagedOSImage Upgrade e2e tests", Ordered, func() {
),
)

By("checking Planv version")
Eventually(func() string {
up, err := getPlan("os-upgrader-update-osversion")
if err == nil {
Expand Down

0 comments on commit 26f4a73

Please sign in to comment.