File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
v2/internal/testcommon/vcr Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,14 @@ import (
99 "testing"
1010
1111 . "github.com/onsi/gomega"
12+
13+ "github.com/Azure/azure-service-operator/v2/internal/testcommon/creds"
1214)
1315
14- func Test_hideAppConfigurationKeySecrets (t * testing.T ) {
16+ func Test_Redactor_givenInput_returnsExpectedResult (t * testing.T ) {
1517 t .Parallel ()
1618
19+ //TODO: Add more test cases, including ones to cover existing redactions
1720 cases := map [string ]struct {
1821 input string
1922 expected string
@@ -22,6 +25,9 @@ func Test_hideAppConfigurationKeySecrets(t *testing.T) {
2225 input : "" ,
2326 expected : "" ,
2427 },
28+ //
29+ // Test cases for hideAppConfigurationKeySecrets
30+ //
2531 "No secrets" : {
2632 input : `{"someKey":"someValue"}` ,
2733 expected : `{"someKey":"someValue"}` ,
@@ -36,12 +42,15 @@ func Test_hideAppConfigurationKeySecrets(t *testing.T) {
3642 },
3743 }
3844
45+ ids := creds.AzureIDs {}
46+ redactor := NewRedactor (ids )
47+
3948 for name , c := range cases {
4049 t .Run (name , func (t * testing.T ) {
4150 t .Parallel ()
4251 g := NewGomegaWithT (t )
4352
44- actual := hideAppConfigurationKeySecrets (c .input )
53+ actual := redactor . HideRecordingData (c .input )
4554
4655 g .Expect (actual ).To (Equal (c .expected ))
4756 })
You can’t perform that action at this time.
0 commit comments