Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ale8k committed Mar 4, 2024
1 parent a828285 commit b983288
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/cmdtest/jimmsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func (s *JimmCmdSuite) SetUpTest(c *gc.C) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}

srv, err := service.NewService(ctx, s.Params)
Expand Down
1 change: 1 addition & 0 deletions internal/jimmjwx/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func setupService(ctx context.Context, c *qt.C) (*jimm.Service, *httptest.Server
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
})
c.Assert(err, qt.IsNil)

Expand Down
8 changes: 8 additions & 0 deletions service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestDefaultService(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
})
c.Assert(err, qt.IsNil)
rr := httptest.NewRecorder()
Expand All @@ -80,6 +81,7 @@ func TestServiceStartsWithoutSecretStore(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
})
c.Assert(err, qt.IsNil)
}
Expand All @@ -102,6 +104,7 @@ func TestAuthenticator(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
candid := startCandid(c, &p)
svc, err := jimm.NewService(context.Background(), p)
Expand Down Expand Up @@ -171,6 +174,7 @@ func TestVault(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
candid := startCandid(c, &p)
vaultClient, _, creds, _ := jimmtest.VaultClient(c, ".")
Expand Down Expand Up @@ -240,6 +244,7 @@ func TestPostgresSecretStore(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
_, err = jimm.NewService(context.Background(), p)
c.Assert(err, qt.IsNil)
Expand All @@ -262,6 +267,7 @@ func TestOpenFGA(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
candid := startCandid(c, &p)
svc, err := jimm.NewService(context.Background(), p)
Expand Down Expand Up @@ -318,6 +324,7 @@ func TestPublicKey(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
_ = startCandid(c, &p)
svc, err := jimm.NewService(context.Background(), p)
Expand Down Expand Up @@ -406,6 +413,7 @@ func TestThirdPartyCaveatDischarge(t *testing.T) {
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
SessionTokenExpiry: time.Duration(time.Hour),
},
DashboardFinalRedirectURL: "",
}
_ = startCandid(c, &p)
svc, err := jimm.NewService(context.Background(), p)
Expand Down

0 comments on commit b983288

Please sign in to comment.