Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
linglingye001 committed Oct 21, 2024
1 parent 7efeeae commit 43941a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/loader/configuraiton_setting_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,16 @@ func TestCompare(t *testing.T) {
assert.False(t, compare(&stringA, &stringB))
}

func TestFeatureFlagId(t *testing.T) {
telemetrySetting1 := newFeatureFlagVariant(".appconfig.featureflag/Telemetry_1", "", true)
calculatedId1 := calculateFeatureFlagId(telemetrySetting1)
assert.Equal(t, "krkOsu9dVV9huwbQDPR6gkV_2T0buWxOCS-nNsj5-6g", calculatedId1)

telemetrySetting2 := newFeatureFlagVariant(".appconfig.featureflag/Telemetry_2", "Test", true)
calculatedId2 := calculateFeatureFlagId(telemetrySetting2)
assert.Equal(t, "Rc8Am7HIGDT7HC5Ovs3wKN_aGaaK_Uz1mH2e11gaK0o", calculatedId2)
}

func TestCreateSecretClients(t *testing.T) {
configProvider := &acpv1.AzureAppConfigurationProvider{
TypeMeta: metav1.TypeMeta{
Expand Down

0 comments on commit 43941a2

Please sign in to comment.