Skip to content

Commit

Permalink
Update provider_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jagan2221 authored Dec 2, 2024
1 parent e1c9f41 commit 6059738
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/configprovider/globprovider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func ValidateProviderScheme(p confmap.Provider) error {

func TestRemotelyManagedMergeFlow(t *testing.T) {
fp := NewWithSettings(confmap.ProviderSettings{})
fp.SetRemotelyManagedMergeFlow(true)
if globProvider, ok := fp.(*globprovider.Provider); ok {
globProvider.SetRemotelyManagedMergeFlow(true)
}
ret, err := fp.Retrieve(context.Background(), schemePrefix+filepath.Join("testdata", "mergefunc", "*.yaml"), nil)
require.NoError(t, err)
retMap, err := ret.AsConf()
Expand All @@ -176,14 +178,15 @@ func TestRemotelyManagedMergeFlow(t *testing.T) {
},
},
},
processor: "someprocessor",
"processor": "someprocessor",
})
assert.Equal(t, expectedMap, retMap)
assert.NoError(t, fp.Shutdown(context.Background()))
}

func TestLocallyManagedMergeFlow(t *testing.T) {
fp := NewWithSettings(confmap.ProviderSettings{})

ret, err := fp.Retrieve(context.Background(), schemePrefix+filepath.Join("testdata", "mergefunc", "*.yaml"), nil)
require.NoError(t, err)
retMap, err := ret.AsConf()
Expand All @@ -198,7 +201,7 @@ func TestLocallyManagedMergeFlow(t *testing.T) {
},
},
},
processor: "someprocessor",
"processor": "someprocessor",
})
assert.Equal(t, expectedMap, retMap)
assert.NoError(t, fp.Shutdown(context.Background()))
Expand Down

0 comments on commit 6059738

Please sign in to comment.