Skip to content

Commit

Permalink
Add unite test for base64-decode (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Oct 1, 2024
1 parent 650b995 commit e95ca0d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions provisioner/ssl-provisioner/provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ func TestGetHomeDir(t *testing.T) {
})
}
}

func TestDecodeBase64(t *testing.T) {
encoded := "dGhpcyBpcyBhIHRlc3Qga2V5"
decoded := "this is a test key"
actual, err := DecodeBase64(encoded)
if err != nil {
t.Errorf("Error decoding %s", encoded)
}

if actual != decoded {
t.Errorf("Wrong decode: '%s'. Should be '%s'", actual, decoded)
}
}

0 comments on commit e95ca0d

Please sign in to comment.