Skip to content

Enable multiple installations by not failing if all existing default resources exists #336

Enable multiple installations by not failing if all existing default resources exists

Enable multiple installations by not failing if all existing default resources exists #336

GitHub Actions / JUnit Test Report failed Dec 10, 2024 in 0s

44 tests run, 43 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 1 in com/port-labs/port-k8s-exporter/pkg/defaults

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

com/port-labs/port-k8s-exporter/pkg/defaults.Test_InitIntegration_PageExists

Failed
Raw output
=== RUN   Test_InitIntegration_PageExists
I1210 13:11:03.485110   11035 init.go:20] Initializing Port integration
I1210 13:11:03.658773   11035 init.go:31] Could not get integration with state key 813a7f9a-e110-40b8-8f30-21da7c4c38bf, error: error getting Port integration: failed to get integration, got: {"ok":false,"error":"not_found","message":"Integration with installationId \"813a7f9a-e110-40b8-8f30-21da7c4c38bf\" was not found","details":{"resource":"Integration","byField":"installationId","withValue":"813a7f9a-e110-40b8-8f30-21da7c4c38bf"}}
I1210 13:11:03.658796   11035 init.go:32] Creating integration
I1210 13:11:03.658805   11035 init.go:37] Creating default resources
W1210 13:11:04.560276   11035 defaults.go:163] Page with identifier workload_overview_dashboard already exists
W1210 13:11:04.765053   11035 defaults.go:176] Failed to create resources: [page with identifier workload_overview_dashboard already exists].
I1210 13:11:05.653149   11035 defaults.go:199] Created blueprint cluster
I1210 13:11:05.687313   11035 defaults.go:199] Created blueprint namespace
I1210 13:11:05.964213   11035 defaults.go:199] Created blueprint workload
I1210 13:11:08.702610   11035 defaults.go:255] Created page availability_scorecard_dashboard
W1210 13:11:08.721663   11035 defaults.go:252] Failed to create page workload_overview_dashboard: error creating Port page: failed to create page, got: {"ok":false,"error":"identifier_taken","message":"The identifier \"workload_overview_dashboard\" is taken, page's identifier should be unique","details":{"identifier":"workload_overview_dashboard"}}
I1210 13:11:08.721689   11035 defaults.go:138] Failed to create resources: error creating Port page: failed to create page, got: {"ok":false,"error":"identifier_taken","message":"The identifier \"workload_overview_dashboard\" is taken, page's identifier should be unique","details":{"identifier":"workload_overview_dashboard"}}.
I1210 13:11:08.721698   11035 defaults.go:281] Failed to create resources. Rolling back blueprints: [cluster namespace workload]
W1210 13:11:14.870842   11035 defaults.go:288] Failed to rollback blueprint workload creation: error deleting Port blueprint: failed to delete blueprint, got: {"ok":false,"error":"internal_error"}
W1210 13:11:15.153645   11035 init.go:39] Error initializing defaults: AbortDefaultCreationError
W1210 13:11:15.153670   11035 init.go:40] The integration will start without default integration mapping and other default resources. Please create them manually in Port. 
I1210 13:11:15.153676   11035 init.go:47] Could not create default resources, creating integration with no resources
I1210 13:11:15.153682   11035 init.go:48] Creating integration with config: &{false false []  false <nil> <nil>}
    cleanup.go:44: 
        	Error Trace:	/home/runner/work/port-k8s-exporter/port-k8s-exporter/test_utils/cleanup.go:44
        	            				/home/runner/work/port-k8s-exporter/port-k8s-exporter/pkg/defaults/defaults_test.go:166
        	Error:      	Expected value not to be nil.
        	Test:       	Test_InitIntegration_PageExists
    defaults_test.go:27: Deleting default resources for 813a7f9a-e110-40b8-8f30-21da7c4c38bf
--- FAIL: Test_InitIntegration_PageExists (36.74s)