@@ -202,6 +202,7 @@ func TestReconcileAgent_HappyPath_ProvisionsAndPins(t *testing.T) {
202202 {"secrets" , "agent-quant" , "hermes-api-server" },
203203 {"deployments" , "agent-quant" , "hermes" },
204204 {"services" , "agent-quant" , "hermes" },
205+ {"networkpolicies" , "agent-quant" , "agent-isolation" },
205206 } {
206207 if ! resourceExists (t , c , kind .gvr , kind .ns , kind .name ) {
207208 t .Errorf ("%s/%s/%s not applied" , kind .gvr , kind .ns , kind .name )
@@ -426,6 +427,7 @@ func newProvisioningTestController(t *testing.T, agent *monetizeapi.Agent, seedO
426427 monetizeapi .SecretGVR : "SecretList" ,
427428 monetizeapi .DeploymentGVR : "DeploymentList" ,
428429 monetizeapi .ServiceGVR : "ServiceList" ,
430+ monetizeapi .NetworkPolicyGVR : "NetworkPolicyList" ,
429431 },
430432 objects ... ,
431433 )
@@ -469,8 +471,11 @@ func litellmSecretObject(t *testing.T, masterKey string) *unstructured.Unstructu
469471func resourceExists (t * testing.T , c * Controller , resource , namespace , name string ) bool {
470472 t .Helper ()
471473 gvr := schema.GroupVersionResource {Group : "" , Version : "v1" , Resource : resource }
472- if resource == "deployments" {
474+ switch resource {
475+ case "deployments" :
473476 gvr = schema.GroupVersionResource {Group : "apps" , Version : "v1" , Resource : resource }
477+ case "networkpolicies" :
478+ gvr = schema.GroupVersionResource {Group : "networking.k8s.io" , Version : "v1" , Resource : resource }
474479 }
475480 dyn := c .dynClient .Resource (gvr )
476481 if namespace != "" {
0 commit comments