We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4377d05 commit 7edec8cCopy full SHA for 7edec8c
1 file changed
pkg/gitreceive/storage/auth_test.go
@@ -39,3 +39,15 @@ func TestGetAuthSuccess(t *testing.T) {
39
assert.NoErr(t, err)
40
assert.True(t, creds != nil, "creds were nil when they shouldn't have been")
41
}
42
+
43
+func TestCredsOKFail(t *testing.T) {
44
+ fs := sys.NewFakeFS()
45
+ assert.False(t, CredsOK(fs), "true returned when there were no credentials")
46
+}
47
48
+func TestCredsOKSuccess(t *testing.T) {
49
50
+ fs.Files[accessKeyIDFile] = []byte("stuff")
51
+ fs.Files[accessSecretKeyFile] = []byte("other stuff")
52
+ assert.True(t, CredsOK(fs), "false returned when there were valid credentials")
53
0 commit comments