File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
internal/controller/provisioner Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
25
25
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/provisioner/openshift/openshiftfakes"
26
26
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/graph"
27
27
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/controller"
28
+ "github.com/nginx/nginx-gateway-fabric/v2/internal/framework/controller/controllerfakes"
28
29
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
29
30
)
30
31
@@ -558,3 +559,21 @@ func TestProvisionerRestartsDaemonSet(t *testing.T) {
558
559
g .Expect (fakeClient .Get (context .TODO (), key , ds )).To (Succeed ())
559
560
g .Expect (ds .Spec .Template .GetAnnotations ()).To (HaveKey (controller .RestartedAnnotation ))
560
561
}
562
+
563
+ func TestDefaultLabelCollectorFactory (t * testing.T ) {
564
+ t .Parallel ()
565
+ g := NewWithT (t )
566
+
567
+ mgr := & controllerfakes.FakeManager {}
568
+
569
+ cfg := Config {
570
+ GatewayPodConfig : & config.GatewayPodConfig {
571
+ Namespace : "pod-namespace" ,
572
+ Name : "pod-name" ,
573
+ Version : "my-version" ,
574
+ },
575
+ }
576
+
577
+ collector := defaultLabelCollectorFactory (mgr , cfg )
578
+ g .Expect (collector ).NotTo (BeNil ())
579
+ }
You can’t perform that action at this time.
0 commit comments