From fb0c5fd06184f33a03d8d4fb29a3aef8b1dafe78 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 8 Nov 2020 17:54:28 +0100 Subject: repo: expose all lamport clocks, move clocks in their own folder --- bridge/core/auth/credential_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bridge/core/auth') diff --git a/bridge/core/auth/credential_test.go b/bridge/core/auth/credential_test.go index 60c631d7..8bb25835 100644 --- a/bridge/core/auth/credential_test.go +++ b/bridge/core/auth/credential_test.go @@ -11,7 +11,7 @@ import ( ) func TestCredential(t *testing.T) { - repo := repository.NewMockRepoForTest() + repo := repository.NewMockRepo() storeToken := func(val string, target string) *Token { token := NewToken(target, val) @@ -102,7 +102,7 @@ func sameIds(t *testing.T, a []Credential, b []Credential) { } func testCredentialSerial(t *testing.T, original Credential) Credential { - repo := repository.NewMockRepoForTest() + repo := repository.NewMockRepo() original.SetMetadata("test", "value") -- cgit From 890c014d919f705eac624547031c79205a71321b Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 28 Mar 2021 22:18:01 +0200 Subject: repo: fix various config issues around case insentivity --- bridge/core/auth/credential.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bridge/core/auth') diff --git a/bridge/core/auth/credential.go b/bridge/core/auth/credential.go index 2327a6fc..20343c9c 100644 --- a/bridge/core/auth/credential.go +++ b/bridge/core/auth/credential.go @@ -3,12 +3,13 @@ package auth import ( "encoding/base64" "encoding/json" - "errors" "fmt" "strconv" "strings" "time" + "github.com/pkg/errors" + "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/repository" ) @@ -159,7 +160,8 @@ func List(repo repository.RepoKeyring, opts ...ListOption) ([]Credential, error) item, err := repo.Keyring().Get(key) if err != nil { - return nil, err + // skip unreadable items, nothing much we can do for them anyway + continue } cred, err := decode(item) -- cgit