Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
skhalash committed Jul 4, 2024
1 parent d1f5b9c commit 9d246d2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions receiver/kymastatsreceiver/kyma_scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,10 @@ func TestScrape(t *testing.T) {
},
}, "status")

istioCustom := newUnstructuredObject("operator.kyma-project.io/v1", "Istio", "kyma-system", "deployed-manually")
// istio custom resource is broken since it has no conditions, thus it should be ignored
istioCustom := newUnstructuredObject("operator.kyma-project.io/v1", "Istio", "kyma-system", "custom")
unstructured.SetNestedMap(istioCustom, map[string]interface{}{
"state": "Ready",
"conditions": []interface{}{
map[string]interface{}{
"type": "IstioHealthy",
"status": "True",
"reason": "AllFine",
},
},
}, "status")

client := fake.NewSimpleDynamicClientWithCustomListKinds(scheme,
Expand Down

0 comments on commit 9d246d2

Please sign in to comment.