Update conformance
This commit is contained in:
parent
7fc3f230df
commit
c789c5808e
2 changed files with 28 additions and 38 deletions
|
@ -91,7 +91,6 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) {
|
||||||
LoggedIn: true,
|
LoggedIn: true,
|
||||||
Expiry: neverExpire,
|
Expiry: neverExpire,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
@ -123,7 +122,6 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) {
|
||||||
LoggedIn: true,
|
LoggedIn: true,
|
||||||
Expiry: neverExpire,
|
Expiry: neverExpire,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "2",
|
UserID: "2",
|
||||||
Username: "john",
|
Username: "john",
|
||||||
|
@ -165,14 +163,13 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) {
|
||||||
|
|
||||||
func testAuthCodeCRUD(t *testing.T, s storage.Storage) {
|
func testAuthCodeCRUD(t *testing.T, s storage.Storage) {
|
||||||
a1 := storage.AuthCode{
|
a1 := storage.AuthCode{
|
||||||
ID: storage.NewID(),
|
ID: storage.NewID(),
|
||||||
ClientID: "client1",
|
ClientID: "client1",
|
||||||
RedirectURI: "https://localhost:80/callback",
|
RedirectURI: "https://localhost:80/callback",
|
||||||
Nonce: "foobar",
|
Nonce: "foobar",
|
||||||
Scopes: []string{"openid", "email"},
|
Scopes: []string{"openid", "email"},
|
||||||
Expiry: neverExpire,
|
Expiry: neverExpire,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
@ -187,14 +184,13 @@ func testAuthCodeCRUD(t *testing.T, s storage.Storage) {
|
||||||
}
|
}
|
||||||
|
|
||||||
a2 := storage.AuthCode{
|
a2 := storage.AuthCode{
|
||||||
ID: storage.NewID(),
|
ID: storage.NewID(),
|
||||||
ClientID: "client2",
|
ClientID: "client2",
|
||||||
RedirectURI: "https://localhost:80/callback",
|
RedirectURI: "https://localhost:80/callback",
|
||||||
Nonce: "foobar",
|
Nonce: "foobar",
|
||||||
Scopes: []string{"openid", "email"},
|
Scopes: []string{"openid", "email"},
|
||||||
Expiry: neverExpire,
|
Expiry: neverExpire,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "2",
|
UserID: "2",
|
||||||
Username: "john",
|
Username: "john",
|
||||||
|
@ -323,7 +319,6 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
|
||||||
EmailVerified: true,
|
EmailVerified: true,
|
||||||
Groups: []string{"a", "b"},
|
Groups: []string{"a", "b"},
|
||||||
},
|
},
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
}
|
}
|
||||||
if err := s.CreateRefresh(refresh); err != nil {
|
if err := s.CreateRefresh(refresh); err != nil {
|
||||||
t.Fatalf("create refresh token: %v", err)
|
t.Fatalf("create refresh token: %v", err)
|
||||||
|
@ -377,7 +372,6 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
|
||||||
EmailVerified: true,
|
EmailVerified: true,
|
||||||
Groups: []string{"a", "b"},
|
Groups: []string{"a", "b"},
|
||||||
},
|
},
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.CreateRefresh(refresh2); err != nil {
|
if err := s.CreateRefresh(refresh2); err != nil {
|
||||||
|
@ -729,14 +723,13 @@ func testGC(t *testing.T, s storage.Storage) {
|
||||||
|
|
||||||
expiry := time.Now().In(est)
|
expiry := time.Now().In(est)
|
||||||
c := storage.AuthCode{
|
c := storage.AuthCode{
|
||||||
ID: storage.NewID(),
|
ID: storage.NewID(),
|
||||||
ClientID: "foobar",
|
ClientID: "foobar",
|
||||||
RedirectURI: "https://localhost:80/callback",
|
RedirectURI: "https://localhost:80/callback",
|
||||||
Nonce: "foobar",
|
Nonce: "foobar",
|
||||||
Scopes: []string{"openid", "email"},
|
Scopes: []string{"openid", "email"},
|
||||||
Expiry: expiry,
|
Expiry: expiry,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
@ -788,7 +781,6 @@ func testGC(t *testing.T, s storage.Storage) {
|
||||||
LoggedIn: true,
|
LoggedIn: true,
|
||||||
Expiry: expiry,
|
Expiry: expiry,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
@ -841,14 +833,13 @@ func testTimezones(t *testing.T, s storage.Storage) {
|
||||||
expiry := time.Now().In(est).Round(time.Millisecond)
|
expiry := time.Now().In(est).Round(time.Millisecond)
|
||||||
|
|
||||||
c := storage.AuthCode{
|
c := storage.AuthCode{
|
||||||
ID: storage.NewID(),
|
ID: storage.NewID(),
|
||||||
ClientID: "foobar",
|
ClientID: "foobar",
|
||||||
RedirectURI: "https://localhost:80/callback",
|
RedirectURI: "https://localhost:80/callback",
|
||||||
Nonce: "foobar",
|
Nonce: "foobar",
|
||||||
Scopes: []string{"openid", "email"},
|
Scopes: []string{"openid", "email"},
|
||||||
Expiry: expiry,
|
Expiry: expiry,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
|
|
@ -67,7 +67,6 @@ func testAuthRequestConcurrentUpdate(t *testing.T, s storage.Storage) {
|
||||||
LoggedIn: true,
|
LoggedIn: true,
|
||||||
Expiry: neverExpire,
|
Expiry: neverExpire,
|
||||||
ConnectorID: "ldap",
|
ConnectorID: "ldap",
|
||||||
ConnectorData: []byte(`{"some":"data"}`),
|
|
||||||
Claims: storage.Claims{
|
Claims: storage.Claims{
|
||||||
UserID: "1",
|
UserID: "1",
|
||||||
Username: "jane",
|
Username: "jane",
|
||||||
|
|
Reference in a new issue