Skip to content

Commit 4fee909

Browse files
authored
Merge pull request #3120 from chrischdi/pr-runtime-sdk-flake-resource-version
🌱 test: dump resources before ValidateResourceVersionStable test
2 parents e2627e2 + e4120f6 commit 4fee909

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

test/e2e/cluster_upgrade_runtimesdk_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package e2e
1818

1919
import (
20+
"path/filepath"
21+
2022
"github.com/blang/semver/v4"
2123
. "github.com/onsi/ginkgo/v2"
2224
. "github.com/onsi/gomega"
@@ -42,6 +44,12 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass with Runt
4244
ArtifactFolder: artifactFolder,
4345
SkipCleanup: skipCleanup,
4446
PostUpgrade: func(proxy framework.ClusterProxy, namespace, clusterName string) {
47+
// Dump all Cluster API related resources to artifacts before checking for resource versions being stable.
48+
framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{
49+
Lister: proxy.GetClient(),
50+
Namespace: namespace,
51+
LogPath: filepath.Join(artifactFolder, "clusters-beforeValidateResourceVersions", proxy.GetName(), "resources")})
52+
4553
// This check ensures that the resourceVersions are stable, i.e. it verifies there are no
4654
// continuous reconciles when everything should be stable.
4755
framework.ValidateResourceVersionStable(ctx, proxy, namespace, FilterObjectsWithKindAndName(clusterName))

test/e2e/ownerrefs_finalizers_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121
"fmt"
2222
"os"
23+
"path/filepath"
2324
"time"
2425

2526
. "github.com/onsi/ginkgo/v2"
@@ -149,6 +150,12 @@ var _ = Describe("Ensure OwnerReferences and Finalizers are resilient [vcsim] [s
149150
return nil
150151
}, 5*time.Minute, 15*time.Second).Should(Succeed(), "Waiting for nodes to be ready")
151152

153+
// Dump all Cluster API related resources to artifacts before checking for resource versions being stable.
154+
framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{
155+
Lister: proxy.GetClient(),
156+
Namespace: namespace,
157+
LogPath: filepath.Join(artifactFolder, "clusters-beforeValidateResourceVersions", proxy.GetName(), "resources")})
158+
152159
// This check ensures that the resourceVersions are stable, i.e. it verifies there are no
153160
// continuous reconciles when everything should be stable.
154161
// Note: we are not checking resourceVersions on VirtualMachine (reconciled by VM-Operator)

0 commit comments

Comments
 (0)