@@ -28,7 +28,7 @@ func TestNewInstance(t *testing.T) {
2828
2929 t .Run ("with kubeconfig string" , func (t * testing.T ) {
3030 // This will likely fail since we don't have a real kubeconfig, but we test the flow
31- _ , err := NewInstance (instance , validKubeconfig , false , false )
31+ _ , err := NewInstance (instance , validKubeconfig , false , false , false )
3232 // We expect this to fail since the context doesn't exist in our test kubeconfig
3333 if err != nil {
3434 assert .Contains (t , err .Error (), "context test-context does not exist in kubeconfig" )
@@ -37,7 +37,7 @@ func TestNewInstance(t *testing.T) {
3737
3838 t .Run ("without kubeconfig string" , func (t * testing.T ) {
3939 // This will likely fail since we don't have a real kubeconfig file, but we test the flow
40- _ , err := NewInstance (instance , "" , false , false )
40+ _ , err := NewInstance (instance , "" , false , false , false )
4141 // We expect this to fail since the context doesn't exist in the default kubeconfig
4242 if err != nil {
4343 assert .True (t ,
@@ -60,7 +60,7 @@ func TestNewInstance(t *testing.T) {
6060 },
6161 }
6262
63- _ , err := NewInstance (instanceNoContext , validKubeconfig , false , false )
63+ _ , err := NewInstance (instanceNoContext , validKubeconfig , false , false , false )
6464 // This should work with our test kubeconfig since it uses the default context
6565 if err != nil {
6666 assert .True (t ,
@@ -85,7 +85,7 @@ func TestInstanceMethods(t *testing.T) {
8585
8686 t .Run ("GetClient and GetConfig" , func (t * testing.T ) {
8787 // This will likely fail, but we test the method signatures
88- inst , err := NewInstance (instance , validKubeconfig , false , false )
88+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
8989 if err == nil {
9090 // If it succeeds, test the methods
9191 client := inst .GetClient ()
@@ -110,7 +110,7 @@ func TestInstanceExporterMethods(t *testing.T) {
110110 }
111111
112112 t .Run ("listExporters with namespace" , func (t * testing.T ) {
113- inst , err := NewInstance (instance , validKubeconfig , false , false )
113+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
114114 if err == nil {
115115 // Test that the method exists and can be called
116116 ctx := context .Background ()
@@ -143,7 +143,7 @@ func TestInstanceExporterMethods(t *testing.T) {
143143 },
144144 }
145145
146- inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false )
146+ inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false , false )
147147 if err == nil {
148148 ctx := context .Background ()
149149 exporters , err := inst .listExporters (ctx )
@@ -164,7 +164,7 @@ func TestInstanceExporterMethods(t *testing.T) {
164164 })
165165
166166 t .Run ("GetExporterByName" , func (t * testing.T ) {
167- inst , err := NewInstance (instance , validKubeconfig , false , false )
167+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
168168 if err == nil {
169169 ctx := context .Background ()
170170 exporter , err := inst .GetExporterByName (ctx , "test-exporter" )
@@ -196,7 +196,7 @@ func TestInstanceExporterMethods(t *testing.T) {
196196 },
197197 }
198198
199- inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false )
199+ inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false , false )
200200 if err == nil {
201201 ctx := context .Background ()
202202 _ , err := inst .GetExporterByName (ctx , "test-exporter" )
@@ -220,7 +220,7 @@ func TestInstanceClientMethods(t *testing.T) {
220220 }
221221
222222 t .Run ("ListClients with namespace" , func (t * testing.T ) {
223- inst , err := NewInstance (instance , validKubeconfig , false , false )
223+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
224224 if err == nil {
225225 ctx := context .Background ()
226226 clients , err := inst .ListClients (ctx )
@@ -242,7 +242,7 @@ func TestInstanceClientMethods(t *testing.T) {
242242 })
243243
244244 t .Run ("GetClientByName" , func (t * testing.T ) {
245- inst , err := NewInstance (instance , validKubeconfig , false , false )
245+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
246246 if err == nil {
247247 ctx := context .Background ()
248248 client , err := inst .GetClientByName (ctx , "test-client" )
@@ -274,7 +274,7 @@ func TestInstanceClientMethods(t *testing.T) {
274274 },
275275 }
276276
277- inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false )
277+ inst , err := NewInstance (instanceNoNamespace , validKubeconfig , false , false , false )
278278 if err == nil {
279279 ctx := context .Background ()
280280 _ , err := inst .GetClientByName (ctx , "test-client" )
@@ -339,7 +339,7 @@ func TestPrintDiff(t *testing.T) {
339339 }
340340
341341 // Create an instance to test the printDiff method
342- inst , err := NewInstance (instance , validKubeconfig , false , false )
342+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
343343 if err == nil {
344344 // This should not panic and should print a diff
345345 inst .checkAndPrintDiff (oldObj , newObj , "exporter" , "test-exporter" , true )
@@ -356,7 +356,7 @@ func TestPrintDiff(t *testing.T) {
356356 }
357357
358358 // Create an instance to test the printDiff method
359- inst , err := NewInstance (instance , validKubeconfig , false , false )
359+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
360360 if err == nil {
361361 // This should not panic and should indicate no changes
362362 inst .checkAndPrintDiff (obj , obj , "exporter" , "test-exporter" , true )
@@ -379,7 +379,7 @@ func TestCheckAndPrintDiff(t *testing.T) {
379379 }
380380
381381 // Create an instance for testing
382- inst , err := NewInstance (instance , validKubeconfig , false , false )
382+ inst , err := NewInstance (instance , validKubeconfig , false , false , false )
383383 require .NoError (t , err )
384384
385385 t .Run ("identical objects should return false" , func (t * testing.T ) {
0 commit comments