diff --git a/test/e2e/cluster_upgrade_runtimesdk_test.go b/test/e2e/cluster_upgrade_runtimesdk_test.go index b597eaf608..e390bfe57e 100644 --- a/test/e2e/cluster_upgrade_runtimesdk_test.go +++ b/test/e2e/cluster_upgrade_runtimesdk_test.go @@ -17,6 +17,8 @@ limitations under the License. package e2e import ( + "path/filepath" + "github.com/blang/semver/v4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -42,6 +44,12 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass with Runt ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, PostUpgrade: func(proxy framework.ClusterProxy, namespace, clusterName string) { + // Dump all Cluster API related resources to artifacts before checking for resource versions being stable. + framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{ + Lister: proxy.GetClient(), + Namespace: namespace, + LogPath: filepath.Join(artifactFolder, "clusters-beforeValidateResourceVersions", proxy.GetName(), "resources")}) + // This check ensures that the resourceVersions are stable, i.e. it verifies there are no // continuous reconciles when everything should be stable. framework.ValidateResourceVersionStable(ctx, proxy, namespace, FilterObjectsWithKindAndName(clusterName)) diff --git a/test/e2e/ownerrefs_finalizers_test.go b/test/e2e/ownerrefs_finalizers_test.go index 5d6694d506..2e10cd7fc5 100644 --- a/test/e2e/ownerrefs_finalizers_test.go +++ b/test/e2e/ownerrefs_finalizers_test.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "os" + "path/filepath" "time" . "github.com/onsi/ginkgo/v2" @@ -149,6 +150,12 @@ var _ = Describe("Ensure OwnerReferences and Finalizers are resilient [vcsim] [s return nil }, 5*time.Minute, 15*time.Second).Should(Succeed(), "Waiting for nodes to be ready") + // Dump all Cluster API related resources to artifacts before checking for resource versions being stable. + framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{ + Lister: proxy.GetClient(), + Namespace: namespace, + LogPath: filepath.Join(artifactFolder, "clusters-beforeValidateResourceVersions", proxy.GetName(), "resources")}) + // This check ensures that the resourceVersions are stable, i.e. it verifies there are no // continuous reconciles when everything should be stable. // Note: we are not checking resourceVersions on VirtualMachine (reconciled by VM-Operator)