mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 16:15:56 +00:00
more test cleanup
This commit is contained in:
parent
67d438aab5
commit
daeebf98eb
2 changed files with 7 additions and 6 deletions
|
|
@ -633,7 +633,7 @@ func (c *Config) ValidateAuth() ([]error, error) {
|
|||
|
||||
if name == "HashKey" || name == "BlockKey" {
|
||||
if len(value) != 64 {
|
||||
errors = append(errors, fmt.Errorf("invalid key length for %s", name))
|
||||
errors = append(errors, fmt.Errorf("invalid key length for %s. exp %d, got %d", name, 64, len(value)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ func TestConfig_validateAuth(t *testing.T) {
|
|||
validTestURL := "https://url.com/"
|
||||
validClientID := "clientid"
|
||||
validClientSecret := "clientSecret"
|
||||
validKey := "3db6665be8b860af422155acf2346d4fcb46678fca42e60d934abe0b7ce43600"
|
||||
notValidURL := "not-a-url"
|
||||
emptyString := ""
|
||||
validStringSlice := []string{"https://graph.microsoft.com/.default", "offline_access"}
|
||||
|
|
@ -465,7 +466,7 @@ func TestConfig_validateAuth(t *testing.T) {
|
|||
GroupEndpointURL: notValidURL,
|
||||
Scopes: validStringSlice,
|
||||
HashKey: emptyString,
|
||||
BlockKey: validString,
|
||||
BlockKey: validKey,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -479,8 +480,8 @@ func TestConfig_validateAuth(t *testing.T) {
|
|||
TokenURL: validTestURL,
|
||||
GroupEndpointURL: validTestURL,
|
||||
Scopes: validStringSlice,
|
||||
HashKey: validString,
|
||||
BlockKey: validString,
|
||||
HashKey: validKey,
|
||||
BlockKey: validKey,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -494,8 +495,8 @@ func TestConfig_validateAuth(t *testing.T) {
|
|||
TokenURL: validString,
|
||||
GroupEndpointURL: validString,
|
||||
Scopes: validStringSlice,
|
||||
HashKey: validString,
|
||||
BlockKey: validString,
|
||||
HashKey: validKey,
|
||||
BlockKey: validKey,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue