builtin/logical/aws: fix dropped test error (#12417)

This commit is contained in:
Lars Lehtonen
2021-08-26 07:55:39 -07:00
committed by GitHub
parent a55713b72f
commit c04328cd9a

View File

@@ -246,7 +246,12 @@ func Test_combinePolicyDocuments(t *testing.T) {
t.Fatalf("got unexpected error: %s", err)
}
// remove whitespace
tc.expectedOutput, err = compactJSON(tc.expectedOutput)
if tc.expectedOutput != "" {
tc.expectedOutput, err = compactJSON(tc.expectedOutput)
if err != nil {
t.Fatalf("error compacting JSON: %s", err)
}
}
if policyOut != tc.expectedOutput {
t.Fatalf("did not receive expected output: want %s, got %s", tc.expectedOutput, policyOut)
}