Enable multiple installations by not failing if all existing default resources exists #349
GitHub Actions / JUnit Test Report
failed
Jan 14, 2025 in 0s
39 tests run, 38 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 1 in com/port-labs/port-k8s-exporter/pkg/defaults
github-actions / JUnit Test Report
com/port-labs/port-k8s-exporter/pkg/defaults.Test_InitIntegration_BlueprintExists
Failed
Raw output
=== RUN Test_InitIntegration_BlueprintExists
I0114 07:19:41.542380 6711 init.go:20] Initializing Port integration
I0114 07:19:41.704111 6711 init.go:31] Could not get integration with state key a24ea656-ebfb-4c8d-b299-399c77643ada, error: error getting Port integration: failed to get integration, got: {"ok":false,"error":"not_found","message":"Integration with installationId \"a24ea656-ebfb-4c8d-b299-399c77643ada\" was not found","details":{"resource":"Integration","byField":"installationId","withValue":"a24ea656-ebfb-4c8d-b299-399c77643ada"}}
I0114 07:19:41.704127 6711 init.go:32] Creating integration
I0114 07:19:41.704136 6711 init.go:37] Creating default resources
W0114 07:19:42.838523 6711 defaults.go:156] Blueprint with identifier workload already exists
W0114 07:19:43.189371 6711 defaults.go:176] Failed to create resources: [blueprint with identifier workload already exists].
I0114 07:19:43.189392 6711 init.go:42] Default resources created successfully
defaults_test.go:27: Deleting default resources for a24ea656-ebfb-4c8d-b299-399c77643ada
--- FAIL: Test_InitIntegration_BlueprintExists (21.21s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x72127d]
goroutine 215 [running]:
testing.tRunner.func1.2({0x761c60, 0xa87de0})
/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1634 +0x377
panic({0x761c60?, 0xa87de0?})
/opt/hostedtoolcache/go/1.22.10/x64/src/runtime/panic.go:770 +0x132
github.com/port-labs/port-k8s-exporter/pkg/defaults.Test_InitIntegration_BlueprintExists(0xc00013b1e0)
/home/runner/work/port-k8s-exporter/port-k8s-exporter/pkg/defaults/defaults_test.go:134 +0x27d
testing.tRunner(0xc00013b1e0, 0x80a698)
/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 1
/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1742 +0x390
Loading