mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-09 01:26:09 +00:00
update code for compatibility with Go 1.27
Fix some test expectations and also fix the production code in impersonator.go to make them compatible with both Go 1.27 and also with older versions, e.g. Go 1.26. With these changes, all unit tests pass when run with either Go 1.26 or Go 1.27. Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
@@ -3664,7 +3664,11 @@ func TestMaybePerformPinnipedSupervisorIDPDiscovery(t *testing.T) {
|
||||
{
|
||||
name: "when the Supervisor returns invalid discovery information, returns an error",
|
||||
pinnipedDiscovery: `"not-valid-discovery-claim"`,
|
||||
wantErr: `could not decode the Pinniped IDP discovery document URL in OIDC discovery from "FAKE-ISSUER": json: cannot unmarshal string into Go struct field OIDCDiscoveryResponse.discovery.supervisor.pinniped.dev/v1alpha1 of type v1alpha1.OIDCDiscoveryResponseIDPEndpoint`,
|
||||
wantErr: testutil.StringBasedOnGoVersion(testutil.GoVersionDependentString{
|
||||
GoVersion: "go1.27",
|
||||
BeforeVersion: `could not decode the Pinniped IDP discovery document URL in OIDC discovery from "FAKE-ISSUER": json: cannot unmarshal string into Go struct field OIDCDiscoveryResponse.discovery.supervisor.pinniped.dev/v1alpha1 of type v1alpha1.OIDCDiscoveryResponseIDPEndpoint`,
|
||||
SinceVersion: `could not decode the Pinniped IDP discovery document URL in OIDC discovery from "FAKE-ISSUER": json: cannot unmarshal string into Go struct field OIDCDiscoveryResponse.discovery.supervisor.pinniped.dev~1v1alpha1 of type v1alpha1.OIDCDiscoveryResponseIDPEndpoint`,
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: "when the Supervisor has invalid pinniped_identity_providers_endpoint, returns an error",
|
||||
|
||||
Reference in New Issue
Block a user