@@ -39,7 +39,7 @@ func testExporterCollectorsAnnotation(t *testing.T, ctx context.Context, cluster
3939 naming .PostgresExporterCollectorsAnnotation : "wrong-value" ,
4040 })
4141
42- assert . NilError ( t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig ) )
42+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig )
4343
4444 assert .Equal (t , len (template .Spec .Containers ), 1 )
4545 container := template .Spec .Containers [0 ]
@@ -56,7 +56,7 @@ func testExporterCollectorsAnnotation(t *testing.T, ctx context.Context, cluster
5656 naming .PostgresExporterCollectorsAnnotation : "None" ,
5757 })
5858
59- assert . NilError ( t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig ) )
59+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig )
6060
6161 assert .Equal (t , len (template .Spec .Containers ), 1 )
6262 container := template .Spec .Containers [0 ]
@@ -71,7 +71,7 @@ func testExporterCollectorsAnnotation(t *testing.T, ctx context.Context, cluster
7171 naming .PostgresExporterCollectorsAnnotation : "none" ,
7272 })
7373
74- assert . NilError ( t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig ) )
74+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , queriesConfig , webConfig )
7575 assert .Assert (t , cmp .Contains (strings .Join (template .Spec .Containers [0 ].Command , "\n " ), "--[no-]collector" ))
7676 })
7777 })
@@ -100,7 +100,7 @@ func TestAddPGMonitorExporterToInstancePodSpec(t *testing.T) {
100100
101101 t .Run ("ExporterDisabled" , func (t * testing.T ) {
102102 template := & corev1.PodTemplateSpec {}
103- assert . NilError ( t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , nil , nil ) )
103+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , nil , nil )
104104 assert .DeepEqual (t , template , & corev1.PodTemplateSpec {})
105105 })
106106
@@ -121,8 +121,7 @@ func TestAddPGMonitorExporterToInstancePodSpec(t *testing.T) {
121121 },
122122 }
123123
124- assert .NilError (t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil ))
125-
124+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil )
126125 assert .Equal (t , len (template .Spec .Containers ), 2 )
127126 container := template .Spec .Containers [1 ]
128127
@@ -205,8 +204,7 @@ volumeMounts:
205204 },
206205 }
207206
208- assert .NilError (t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil ))
209-
207+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil )
210208 assert .Equal (t , len (template .Spec .Containers ), 2 )
211209 container := template .Spec .Containers [1 ]
212210
@@ -255,8 +253,7 @@ name: exporter-config
255253 },
256254 }
257255
258- assert .NilError (t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil ))
259-
256+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , nil )
260257 assert .Equal (t , len (template .Spec .Containers ), 2 )
261258 container := template .Spec .Containers [1 ]
262259
@@ -301,8 +298,7 @@ name: exporter-config
301298 testConfigMap := new (corev1.ConfigMap )
302299 testConfigMap .Name = "test-web-conf"
303300
304- assert .NilError (t , addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , testConfigMap ))
305-
301+ addPGMonitorExporterToInstancePodSpec (ctx , cluster , template , exporterQueriesConfig , testConfigMap )
306302 assert .Equal (t , len (template .Spec .Containers ), 2 )
307303 container := template .Spec .Containers [1 ]
308304
0 commit comments