зеркало из https://github.com/mozilla/doorman.git
Fix test that loads from Github
This commit is contained in:
Родитель
f830787111
Коммит
6506c714e6
|
@ -45,7 +45,7 @@ func TestAllowedVerifiesAuthentication(t *testing.T) {
|
|||
// Will initialize an authenticator (ie. download public keys)
|
||||
d.LoadPolicies(doorman.ServicesConfig{
|
||||
doorman.ServiceConfig{
|
||||
Service: "https://sample.yaml",
|
||||
Service: "https://sample.yaml",
|
||||
IdentityProvider: "https://auth.mozilla.auth0.com/",
|
||||
Policies: doorman.Policies{
|
||||
doorman.Policy{
|
||||
|
|
|
@ -134,7 +134,7 @@ func TestLoadGithub(t *testing.T) {
|
|||
assert.NotNil(t, err)
|
||||
|
||||
// Good URL
|
||||
configs, err := Load([]string{"https://github.com/mozilla/doorman/raw/452ef7a/sample.yaml"})
|
||||
configs, err := Load([]string{"https://github.com/mozilla/doorman/raw/f830787/sample.yaml"})
|
||||
assert.Nil(t, err)
|
||||
require.Equal(t, len(configs), 1)
|
||||
assert.Equal(t, len(configs[0].Tags), 1)
|
||||
|
|
|
@ -38,11 +38,11 @@ type Policies []Policy
|
|||
|
||||
// ServiceConfig represents the policies file content.
|
||||
type ServiceConfig struct {
|
||||
Source string
|
||||
Service string
|
||||
Source string
|
||||
Service string
|
||||
IdentityProvider string `yaml:"identityProvider"`
|
||||
Tags Tags
|
||||
Policies Policies
|
||||
Tags Tags
|
||||
Policies Policies
|
||||
}
|
||||
|
||||
// GetTags returns the tags principals for the ones specified.
|
||||
|
|
|
@ -15,7 +15,7 @@ func TestMain(m *testing.M) {
|
|||
// Load sample policies once
|
||||
sampleConfigs = ServicesConfig{
|
||||
ServiceConfig{
|
||||
Service: "https://sample.yaml",
|
||||
Service: "https://sample.yaml",
|
||||
IdentityProvider: "",
|
||||
Tags: Tags{
|
||||
"admins": Principals{"userid:maria"},
|
||||
|
|
Загрузка…
Ссылка в новой задаче