Revert "Update conformance"

This reverts commit 9c7ceabe8aebf6c740c237c5e76c21397179f901.
This commit is contained in:
Joel Speed 2019-04-18 15:06:48 +01:00
parent 9ce4393156
commit 41b7c855d0
No known key found for this signature in database
GPG key ID: 6E80578D6751DEFB
2 changed files with 38 additions and 28 deletions

View file

@ -91,6 +91,7 @@ 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",
@ -122,6 +123,7 @@ 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",
@ -163,13 +165,14 @@ 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",
@ -184,13 +187,14 @@ 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",
@ -319,6 +323,7 @@ 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)
@ -372,6 +377,7 @@ 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 {
@ -725,13 +731,14 @@ 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",
@ -783,6 +790,7 @@ 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",
@ -835,13 +843,14 @@ 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",

View file

@ -67,6 +67,7 @@ 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",