Skip to content

Commit bc3add8

Browse files
authored
Merge pull request #1888 from rancher/fix_artifacts_collection_e2e
ci: fix artifacts collection at the end of e2e tests
2 parents bf23a6d + ae048ba commit bc3add8

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

test/e2e/suites/capiprovider/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var _ = SynchronizedAfterSuite(
104104
},
105105
func() {
106106
By("Dumping artifacts from the bootstrap cluster")
107-
testenv.DumpBootstrapCluster(ctx)
107+
testenv.DumpBootstrapCluster(ctx, bootstrapClusterProxy.GetKubeconfigPath())
108108

109109
config := e2e.LoadE2EConfig()
110110
// skipping error check since it is already done at the beginning of the test in e2e.ValidateE2EConfig()

test/e2e/suites/chart-upgrade/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var _ = SynchronizedAfterSuite(
105105
},
106106
func() {
107107
By("Dumping artifacts from the bootstrap cluster")
108-
testenv.DumpBootstrapCluster(ctx)
108+
testenv.DumpBootstrapCluster(ctx, bootstrapClusterProxy.GetKubeconfigPath())
109109

110110
config := e2e.LoadE2EConfig()
111111
// skipping error check since it is already done at the beginning of the test in e2e.ValidateE2EConfig()

test/e2e/suites/import-gitops/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ var _ = SynchronizedAfterSuite(
107107
},
108108
func() {
109109
By("Dumping artifacts from the bootstrap cluster")
110-
testenv.DumpBootstrapCluster(ctx)
110+
testenv.DumpBootstrapCluster(ctx, bootstrapClusterProxy.GetKubeconfigPath())
111111

112112
config := e2e.LoadE2EConfig()
113113
// skipping error check since it is already done at the beginning of the test in e2e.ValidateE2EConfig()

test/e2e/suites/v2prov/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ var _ = SynchronizedAfterSuite(
116116
},
117117
func() {
118118
By("Dumping artifacts from the bootstrap cluster")
119-
testenv.DumpBootstrapCluster(ctx)
119+
testenv.DumpBootstrapCluster(ctx, bootstrapClusterProxy.GetKubeconfigPath())
120120

121121
config := e2e.LoadE2EConfig()
122122
// skipping error check since it is already done at the beginning of the test in e2e.ValidateE2EConfig()

test/testenv/cleanup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ func CollectArtifacts(ctx context.Context, input CollectArtifactsInput) error {
141141
return nil
142142
}
143143

144-
func DumpBootstrapCluster(ctx context.Context) {
145-
err := CollectArtifacts(ctx, CollectArtifactsInput{})
144+
func DumpBootstrapCluster(ctx context.Context, kubeconfigPath string) {
145+
err := CollectArtifacts(ctx, CollectArtifactsInput{KubeconfigPath: kubeconfigPath})
146146
if err != nil {
147147
fmt.Printf("Failed to artifacts for the bootstrap cluster: %v\n", err)
148148
return

0 commit comments

Comments
 (0)