mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-07-29 03:22:53 +00:00
bump Supervisor session storage versions
This commit is contained in:
@@ -122,7 +122,7 @@ func TestGarbageCollectorControllerSync(t *testing.T) {
|
||||
spec.Run(t, "Sync", func(t *testing.T, when spec.G, it spec.S) {
|
||||
const (
|
||||
installedInNamespace = "some-namespace"
|
||||
currentSessionStorageVersion = "7" // update this when you update the storage version in the production code
|
||||
currentSessionStorageVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -35,7 +35,8 @@ const (
|
||||
// Version 5 is when we added the UpstreamUsername and UpstreamGroups fields to psession.CustomSessionData.
|
||||
// Version 6 is when we upgraded fosite in Dec 2023.
|
||||
// Version 7 is when OIDCClients were given configurable ID token lifetimes.
|
||||
accessTokenStorageVersion = "7"
|
||||
// Version 8 is when GitHubIdentityProvider was added.
|
||||
accessTokenStorageVersion = "8"
|
||||
)
|
||||
|
||||
type RevocationStorage interface {
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
const (
|
||||
namespace = "test-ns"
|
||||
expectedVersion = "7" // update this when you update the storage version in the production code
|
||||
expectedVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -36,7 +36,8 @@ const (
|
||||
// Version 5 is when we added the UpstreamUsername and UpstreamGroups fields to psession.CustomSessionData.
|
||||
// Version 6 is when we upgraded fosite in Dec 2023.
|
||||
// Version 7 is when OIDCClients were given configurable ID token lifetimes.
|
||||
authorizeCodeStorageVersion = "7"
|
||||
// Version 8 is when GitHubIdentityProvider was added.
|
||||
authorizeCodeStorageVersion = "8"
|
||||
)
|
||||
|
||||
var _ oauth2.AuthorizeCodeStorage = &authorizeCodeStorage{}
|
||||
@@ -397,5 +398,5 @@ const ExpectedAuthorizeCodeSessionJSONFromFuzzing = `{
|
||||
"姧骦:駝重EȫʆɵʮGɃ"
|
||||
]
|
||||
},
|
||||
"version": "7"
|
||||
"version": "8"
|
||||
}`
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
|
||||
const (
|
||||
namespace = "test-ns"
|
||||
expectedVersion = "7" // update this when you update the storage version in the production code
|
||||
expectedVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -36,7 +36,8 @@ const (
|
||||
// Version 5 is when we added the UpstreamUsername and UpstreamGroups fields to psession.CustomSessionData.
|
||||
// Version 6 is when we upgraded fosite in Dec 2023.
|
||||
// Version 7 is when OIDCClients were given configurable ID token lifetimes.
|
||||
oidcStorageVersion = "7"
|
||||
// Version 8 is when GitHubIdentityProvider was added.
|
||||
oidcStorageVersion = "8"
|
||||
)
|
||||
|
||||
var _ openid.OpenIDConnectRequestStorage = &openIDConnectRequestStorage{}
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
const (
|
||||
namespace = "test-ns"
|
||||
expectedVersion = "7" // update this when you update the storage version in the production code
|
||||
expectedVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -34,7 +34,8 @@ const (
|
||||
// Version 5 is when we added the UpstreamUsername and UpstreamGroups fields to psession.CustomSessionData.
|
||||
// Version 6 is when we upgraded fosite in Dec 2023.
|
||||
// Version 7 is when OIDCClients were given configurable ID token lifetimes.
|
||||
pkceStorageVersion = "7"
|
||||
// Version 8 is when GitHubIdentityProvider was added.
|
||||
pkceStorageVersion = "8"
|
||||
)
|
||||
|
||||
var _ pkce.PKCERequestStorage = &pkceStorage{}
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
const (
|
||||
namespace = "test-ns"
|
||||
expectedVersion = "7" // update this when you update the storage version in the production code
|
||||
expectedVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -35,7 +35,8 @@ const (
|
||||
// Version 5 is when we added the UpstreamUsername and UpstreamGroups fields to psession.CustomSessionData.
|
||||
// Version 6 is when we upgraded fosite in Dec 2023.
|
||||
// Version 7 is when OIDCClients were given configurable ID token lifetimes.
|
||||
refreshTokenStorageVersion = "7"
|
||||
// Version 8 is when GitHubIdentityProvider was added.
|
||||
refreshTokenStorageVersion = "8"
|
||||
)
|
||||
|
||||
type RevocationStorage interface {
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
const (
|
||||
namespace = "test-ns"
|
||||
expectedVersion = "7" // update this when you update the storage version in the production code
|
||||
expectedVersion = "8" // update this when you update the storage version in the production code
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -93,7 +93,7 @@ func TestAuthorizeCodeStorage(t *testing.T) {
|
||||
// Note that CreateAuthorizeCodeSession() sets Active to true and also sets the Version before storing the session,
|
||||
// so expect those here.
|
||||
session.Active = true
|
||||
session.Version = "7" // this is the value of the authorizationcode.authorizeCodeStorageVersion constant
|
||||
session.Version = "8" // this is the value of the authorizationcode.authorizeCodeStorageVersion constant
|
||||
expectedSessionStorageJSON, err := json.Marshal(session)
|
||||
require.NoError(t, err)
|
||||
require.JSONEq(t, string(expectedSessionStorageJSON), string(initialSecret.Data["pinniped-storage-data"]))
|
||||
|
||||
Reference in New Issue
Block a user