diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-09-13 12:56:08 +0200 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-09-13 12:56:08 +0200 |
commit | 4f01edb9230f58ff84b0dd892c931ec8ac9aad55 (patch) | |
tree | 9c1598a3f98203913ac2548883c02a81deb33dc7 /srv/src/http/auth_test.go | |
parent | 5485984e05aebde22819adebfbd5ad51475a6c21 (diff) |
move src out of srv, clean up default.nix and Makefile
Diffstat (limited to 'srv/src/http/auth_test.go')
-rw-r--r-- | srv/src/http/auth_test.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/srv/src/http/auth_test.go b/srv/src/http/auth_test.go deleted file mode 100644 index 9e2d440..0000000 --- a/srv/src/http/auth_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package http - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func TestAuther(t *testing.T) { - - ctx := context.Background() - password := "foo" - hashedPassword := NewPasswordHash(password) - - auther := NewAuther(map[string]string{ - "FOO": hashedPassword, - }, 1*time.Millisecond) - - assert.False(t, auther.Allowed(ctx, "BAR", password)) - assert.False(t, auther.Allowed(ctx, "FOO", "bar")) - assert.True(t, auther.Allowed(ctx, "FOO", password)) -} |