Skip to content

Commit

Permalink
Collect crust-gather info before gitrepo removal
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev committed Mar 6, 2024
1 parent 1cedf11 commit d582715
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/e2e/specs/import_gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func CreateUsingGitOpsSpec(ctx context.Context, inputGetter func() CreateUsingGi
})

AfterEach(func() {
err := testenv.CollectArtifacts(ctx, originalKubeconfig.TempFilePath, path.Join(input.ArtifactFolder, input.BootstrapClusterProxy.GetName(), input.ClusterName))
err := testenv.CollectArtifacts(ctx, originalKubeconfig.TempFilePath, path.Join(input.ArtifactFolder, input.BootstrapClusterProxy.GetName(), input.ClusterName+specName))
if err != nil {
fmt.Printf("Failed to collect artifacts for the child cluster: %v\n", err)
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/import_gitops_mgmtv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func CreateMgmtV3UsingGitOpsSpec(ctx context.Context, inputGetter func() CreateM
})

AfterEach(func() {
err := testenv.CollectArtifacts(ctx, originalKubeconfig.TempFilePath, path.Join(input.ArtifactFolder, input.BootstrapClusterProxy.GetName(), input.ClusterName))
err := testenv.CollectArtifacts(ctx, originalKubeconfig.TempFilePath, path.Join(input.ArtifactFolder, input.BootstrapClusterProxy.GetName(), input.ClusterName+specName))
if err != nil {
fmt.Printf("Failed to collect artifacts for the child cluster: %v\n", err)
}
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/suites/update-labels/update_labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
var _ = Describe("[v2prov] [Azure] Creating a cluster with v2prov should still work with CAPI 1.5.x and label renaming", Label(e2e.FullTestLabel), func() {

var (
specName = "updatelabels"
rancherKubeconfig *turtlesframework.RancherGetClusterKubeconfigResult
clusterName string
rancherCluster *provisioningv1.Cluster
Expand Down Expand Up @@ -168,7 +169,7 @@ var _ = Describe("[v2prov] [Azure] Creating a cluster with v2prov should still w
})

AfterEach(func() {
err := testenv.CollectArtifacts(ctx, rancherKubeconfig.TempFilePath, path.Join(flagVals.ArtifactFolder, setupClusterResult.BootstrapClusterProxy.GetName(), clusterName))
err := testenv.CollectArtifacts(ctx, rancherKubeconfig.TempFilePath, path.Join(flagVals.ArtifactFolder, setupClusterResult.BootstrapClusterProxy.GetName(), clusterName+specName))
if err != nil {
fmt.Printf("Failed to collect artifacts for the child cluster: %v\n", err)
}
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/suites/v2prov/v2prov_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
var _ = Describe("[v2prov] [Azure] Creating a cluster with v2prov should still work", Label(e2e.FullTestLabel), func() {

var (
specName = "v2prov"
rancherKubeconfig *turtlesframework.RancherGetClusterKubeconfigResult
clusterName string
rancherCluster *provisioningv1.Cluster
Expand Down Expand Up @@ -167,7 +168,7 @@ var _ = Describe("[v2prov] [Azure] Creating a cluster with v2prov should still w
})

AfterEach(func() {
err := testenv.CollectArtifacts(ctx, rancherKubeconfig.TempFilePath, path.Join(flagVals.ArtifactFolder, setupClusterResult.BootstrapClusterProxy.GetName(), clusterName))
err := testenv.CollectArtifacts(ctx, rancherKubeconfig.TempFilePath, path.Join(flagVals.ArtifactFolder, setupClusterResult.BootstrapClusterProxy.GetName(), clusterName+specName))
if err != nil {
fmt.Printf("Failed to collect artifacts for the child cluster: %v\n", err)
}
Expand Down

0 comments on commit d582715

Please sign in to comment.