Skip to content

Commit

Permalink
Remove BundleDeployments gathering from e2e's gatherArtifacts (#886)
Browse files Browse the repository at this point in the history
When tests fail, gatherArtifacts is run to collect cluster state. This PR removes gathering of BundleDeployments since we don't use them anymore and it's generating additional misleading error messages.

Signed-off-by: dtfranz <dfranz@redhat.com>
  • Loading branch information
dtfranz committed May 23, 2024
1 parent 19ae03f commit e2d0a3c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/e2e/cluster_extension_install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ func TestClusterExtensionInstallSuccessorVersion(t *testing.T) {
// - clusterextensions
// - pods logs
// - deployments
// - bundledeployments
// - catalogsources
func getArtifactsOutput(t *testing.T) {
basePath := env.GetString("ARTIFACT_PATH", "")
Expand Down Expand Up @@ -382,23 +381,6 @@ func getArtifactsOutput(t *testing.T) {
}
}

// Get all BundleDeployments in the namespace and save them to the artifact path.
bundleDeployments := rukpakv1alpha2.BundleDeploymentList{}
if err := c.List(context.Background(), &bundleDeployments, client.InNamespace("")); err != nil {
fmt.Printf("Failed to list bundleDeployments: %v", err)
}
for _, bundleDeployment := range bundleDeployments.Items {
// Save bundleDeployment to artifact path
bundleDeploymentYaml, err := yaml.Marshal(bundleDeployment)
if err != nil {
fmt.Printf("Failed to marshal bundleDeployment: %v", err)
continue
}
if err := os.WriteFile(filepath.Join(artifactPath, bundleDeployment.Name+"-bundleDeployment.yaml"), bundleDeploymentYaml, 0600); err != nil {
fmt.Printf("Failed to write bundleDeployment to file: %v", err)
}
}

for _, namespace := range namespaces.Items {
// let's ignore kube-* namespaces.
if strings.Contains(namespace.Name, "kube-") {
Expand Down

0 comments on commit e2d0a3c

Please sign in to comment.