(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func TestFileStoreGet(t *testing.T) { |
| 123 | f := &fakeStore{configs: map[string]types.AuthConfig{ |
| 124 | "https://example.com": { |
| 125 | Username: "foo@example.com", |
| 126 | Auth: "super_secret_token", |
| 127 | ServerAddress: "https://example.com", |
| 128 | }, |
| 129 | }} |
| 130 | |
| 131 | s := NewFileStore(f) |
| 132 | a, err := s.Get("https://example.com") |
| 133 | if err != nil { |
| 134 | t.Fatal(err) |
| 135 | } |
| 136 | if a.Auth != "super_secret_token" { |
| 137 | t.Fatalf("expected auth `super_secret_token`, got %s", a.Auth) |
| 138 | } |
| 139 | if a.Username != "foo@example.com" { |
| 140 | t.Fatalf("expected username `foo@example.com`, got %s", a.Username) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func TestFileStoreGetAll(t *testing.T) { |
| 145 | s1 := "https://example.com" |
nothing calls this directly
no test coverage detected
searching dependent graphs…