MCPcopy
hub / github.com/kopia/kopia / TestAuthentication

Function TestAuthentication

internal/auth/authn_test.go:10–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestAuthentication(t *testing.T) {
11 a := auth.AuthenticateSingleUser("user1", "password1")
12 verifyAuthenticator(t, a, "user1", "password1", true)
13 verifyAuthenticator(t, a, "user1", "password2", false)
14 verifyAuthenticator(t, a, "user1", "password11", false)
15 verifyAuthenticator(t, a, "user1a", "password1", false)
16 verifyAuthenticator(t, a, "user1a", "password1a", false)
17}
18
19func TestCombineAuthenticators_Empty(t *testing.T) {
20 a := auth.CombineAuthenticators()

Callers

nothing calls this directly

Calls 2

AuthenticateSingleUserFunction · 0.92
verifyAuthenticatorFunction · 0.85

Tested by

no test coverage detected