Closed EktaBharti1998 closed 2 years ago
Updated the go version to 1.17 for the key protect sdk.
``` ektabharti@Ektas-MacBook-Pro keyprotect-go-client % go test -v === RUN TestKeys === RUN TestKeys/New_API === RUN TestKeys/New_API_with_Logger === RUN TestKeys/Timeout === RUN TestKeys/Get_Keys === RUN TestKeys/Wrap_Create_DEK === RUN TestKeys/Wrap_Unwrap_v2 === RUN TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone === RUN TestKeys/Imported_Create_Delete === RUN TestKeys/Create_Delete === RUN TestKeys/Imported_Rotate === RUN TestKeys/Imported_Rotate_Unwrap === RUN TestKeys/Rotate_Unwrap === RUN TestKeys/Timeout#01 === RUN TestKeys/Auth_Context === RUN TestKeys/Auth_in_Config === RUN TestKeys/Wrap_and_Unwrap_AAD === RUN TestKeys/API_Key_Timeout === RUN TestKeys/Bad_Config === RUN TestKeys/Bad_API_Key === RUN TestKeys/Create_Key_Without_Expiration === RUN TestKeys/Create === RUN TestKeys/Rotate === RUN TestKeys/Get_Key === RUN TestKeys/Get_Key_Metadata === RUN TestKeys/Wrap_Unwrap === RUN TestKeys/Delete_Key === RUN TestKeys/Create_Standard_Key === RUN TestKeys/Create_Imported_Standard_Key --- PASS: TestKeys (0.02s) --- PASS: TestKeys/New_API (0.00s) --- PASS: TestKeys/New_API_with_Logger (0.00s) --- PASS: TestKeys/Timeout (0.00s) --- PASS: TestKeys/Get_Keys (0.00s) --- PASS: TestKeys/Wrap_Create_DEK (0.00s) --- PASS: TestKeys/Wrap_Unwrap_v2 (0.00s) --- PASS: TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone (0.00s) --- PASS: TestKeys/Imported_Create_Delete (0.00s) --- PASS: TestKeys/Create_Delete (0.00s) --- PASS: TestKeys/Imported_Rotate (0.00s) --- PASS: TestKeys/Imported_Rotate_Unwrap (0.00s) --- PASS: TestKeys/Rotate_Unwrap (0.00s) --- PASS: TestKeys/Timeout#01 (0.00s) --- PASS: TestKeys/Auth_Context (0.00s) --- PASS: TestKeys/Auth_in_Config (0.00s) --- PASS: TestKeys/Wrap_and_Unwrap_AAD (0.00s) --- PASS: TestKeys/API_Key_Timeout (0.00s) --- PASS: TestKeys/Bad_Config (0.00s) --- PASS: TestKeys/Bad_API_Key (0.00s) --- PASS: TestKeys/Create_Key_Without_Expiration (0.00s) --- PASS: TestKeys/Create (0.00s) --- PASS: TestKeys/Rotate (0.00s) --- PASS: TestKeys/Get_Key (0.00s) --- PASS: TestKeys/Get_Key_Metadata (0.00s) --- PASS: TestKeys/Wrap_Unwrap (0.00s) --- PASS: TestKeys/Delete_Key (0.00s) --- PASS: TestKeys/Create_Standard_Key (0.00s) --- PASS: TestKeys/Create_Imported_Standard_Key (0.00s) === RUN TestMisc === RUN TestMisc/Redact_Values --- PASS: TestMisc (0.00s) --- PASS: TestMisc/Redact_Values (0.00s) === RUN TestImportTokens === RUN TestImportTokens/ImportToken_Create === RUN TestImportTokens/ImportToken_Get === RUN TestImportTokens/Assert_context_authorization_override === RUN TestImportTokens/Dump_Implementations --- PASS: TestImportTokens (0.00s) --- PASS: TestImportTokens/ImportToken_Create (0.00s) --- PASS: TestImportTokens/ImportToken_Get (0.00s) --- PASS: TestImportTokens/Assert_context_authorization_override (0.00s) --- PASS: TestImportTokens/Dump_Implementations (0.00s) === RUN TestKPCheckRetry === RUN TestKPCheckRetry/No_retry_on_successful_codes === RUN TestKPCheckRetry/No_retry_on_400-level_codes === RUN TestKPCheckRetry/Retry_on_429 === RUN TestKPCheckRetry/Retry_on_500+ === RUN TestKPCheckRetry/No_retry_on_501 === RUN TestKPCheckRetry/Retry_on_connection_failures === RUN TestKPCheckRetry/No_retry_on_context_failures --- PASS: TestKPCheckRetry (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_successful_codes (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_400-level_codes (0.00s) --- PASS: TestKPCheckRetry/Retry_on_429 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_500+ (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_501 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_connection_failures (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_context_failures (0.00s) === RUN TestDo_ConnectionError_HasCorrelationID --- PASS: TestDo_ConnectionError_HasCorrelationID (0.00s) === RUN TestDo_CorrelationID_Set --- PASS: TestDo_CorrelationID_Set (0.00s) === RUN TestDo_KPErrorResponseWithReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithReasons_IsErrorStruct (0.00s) === RUN TestDo_KPErrorResponseWithoutReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithoutReasons_IsErrorStruct (0.00s) === RUN TestDeleteKey_ForceOptTrue_URLHasForce --- PASS: TestDeleteKey_ForceOptTrue_URLHasForce (0.00s) === RUN TestDeleteKey_WithRegistrations_ErrorCases --- PASS: TestDeleteKey_WithRegistrations_ErrorCases (0.00s) === RUN TestRegistrationsList --- PASS: TestRegistrationsList (0.00s) === RUN TestRestoreKey --- PASS: TestRestoreKey (0.00s) === RUN TestSetAndGetMultipleInstancePolicies --- PASS: TestSetAndGetMultipleInstancePolicies (0.00s) === RUN TestSetAndGetDualAuthInstancePolicy --- PASS: TestSetAndGetDualAuthInstancePolicy (0.00s) === RUN TestSetAndGetAllowedNetworkPolicy --- PASS: TestSetAndGetAllowedNetworkPolicy (0.00s) === RUN TestSetAndGetAllowedIPInstancePolicy --- PASS: TestSetAndGetAllowedIPInstancePolicy (0.00s) === RUN TestSetAndGetKeyCreateImportAccessInstancePolicy --- PASS: TestSetAndGetKeyCreateImportAccessInstancePolicy (0.00s) === RUN TestSetMetricsPolicy --- PASS: TestSetMetricsPolicy (0.00s) === RUN TestSetAllowedIPPolicyError --- PASS: TestSetAllowedIPPolicyError (0.00s) === RUN TestGetPrivateEndpointPortNumber --- PASS: TestGetPrivateEndpointPortNumber (0.00s) === RUN TestSetInstanceDualAuthPolicyError --- PASS: TestSetInstanceDualAuthPolicyError (0.00s) === RUN TestSetKeyPolicies --- PASS: TestSetKeyPolicies (0.00s) === RUN TestGetKeyPolicies --- PASS: TestGetKeyPolicies (0.00s) === RUN TestDisableKey --- PASS: TestDisableKey (0.00s) === RUN TestEnableKey --- PASS: TestEnableKey (0.00s) === RUN TestInitiate_DualAuthDelete --- PASS: TestInitiate_DualAuthDelete (0.00s) === RUN TestCancel_DualAuthDelete --- PASS: TestCancel_DualAuthDelete (0.00s) === RUN TestCreateKeyRing --- PASS: TestCreateKeyRing (0.00s) === RUN TestDeleteKeyRing --- PASS: TestDeleteKeyRing (0.00s) === RUN TestGetKeyRings --- PASS: TestGetKeyRings (0.00s) === RUN TestCreateKeyWithAliases --- PASS: TestCreateKeyWithAliases (0.00s) === RUN TestCreateImportedKeyWithAliases --- PASS: TestCreateImportedKeyWithAliases (0.00s) === RUN TestCreateKeyAlias --- PASS: TestCreateKeyAlias (0.00s) === RUN TestDeleteKeyAlias --- PASS: TestDeleteKeyAlias (0.00s) === RUN TestGetKeyWithAlias --- PASS: TestGetKeyWithAlias (0.00s) === RUN TestGetKeyMetadataWithAlias --- PASS: TestGetKeyMetadataWithAlias (0.00s) PASS ok github.com/IBM/keyprotect-go-client 0.526s ```
``` ektabharti@Ektas-MacBook-Pro keyprotect-go-client % go test -v -tags=integration ./... === RUN TestWrapUnwrap integration_test.go:85: CRK created successfully: id=778a2814-632c-45d3-bb07-4df58b5f3d01 integration_test.go:102: Key deleted: id=778a2814-632c-45d3-bb07-4df58b5f3d01 --- PASS: TestWrapUnwrap (6.03s) === RUN TestRotatedKeyHasLastUpdatedAndRotated integration_test.go:125: CRK created successfully: id=02e199be-3e4a-4338-b41e-fa08af2482f7 integration_test.go:132: CRK rotated successfully: id=02e199be-3e4a-4338-b41e-fa08af2482f7 integration_test.go:148: Key deleted: id=02e199be-3e4a-4338-b41e-fa08af2482f7 --- PASS: TestRotatedKeyHasLastUpdatedAndRotated (6.89s) === RUN TestExtractableKey integration_test.go:177: CRK created successfully: id=210752b0-67fa-4d0e-a85d-70d98cfca0bc --- PASS: TestExtractableKey (6.11s) === RUN TestKeys === RUN TestKeys/New_API === RUN TestKeys/New_API_with_Logger === RUN TestKeys/Timeout === RUN TestKeys/Get_Keys === RUN TestKeys/Wrap_Create_DEK === RUN TestKeys/Wrap_Unwrap_v2 === RUN TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone === RUN TestKeys/Imported_Create_Delete === RUN TestKeys/Create_Delete === RUN TestKeys/Imported_Rotate === RUN TestKeys/Imported_Rotate_Unwrap === RUN TestKeys/Rotate_Unwrap === RUN TestKeys/Timeout#01 === RUN TestKeys/Auth_Context === RUN TestKeys/Auth_in_Config === RUN TestKeys/Wrap_and_Unwrap_AAD === RUN TestKeys/API_Key_Timeout === RUN TestKeys/Bad_Config === RUN TestKeys/Bad_API_Key === RUN TestKeys/Create_Key_Without_Expiration === RUN TestKeys/Create === RUN TestKeys/Rotate === RUN TestKeys/Get_Key === RUN TestKeys/Get_Key_Metadata === RUN TestKeys/Wrap_Unwrap === RUN TestKeys/Delete_Key === RUN TestKeys/Create_Standard_Key === RUN TestKeys/Create_Imported_Standard_Key --- PASS: TestKeys (0.02s) --- PASS: TestKeys/New_API (0.00s) --- PASS: TestKeys/New_API_with_Logger (0.00s) --- PASS: TestKeys/Timeout (0.00s) --- PASS: TestKeys/Get_Keys (0.00s) --- PASS: TestKeys/Wrap_Create_DEK (0.00s) --- PASS: TestKeys/Wrap_Unwrap_v2 (0.00s) --- PASS: TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone (0.00s) --- PASS: TestKeys/Imported_Create_Delete (0.00s) --- PASS: TestKeys/Create_Delete (0.00s) --- PASS: TestKeys/Imported_Rotate (0.00s) --- PASS: TestKeys/Imported_Rotate_Unwrap (0.00s) --- PASS: TestKeys/Rotate_Unwrap (0.00s) --- PASS: TestKeys/Timeout#01 (0.00s) --- PASS: TestKeys/Auth_Context (0.00s) --- PASS: TestKeys/Auth_in_Config (0.00s) --- PASS: TestKeys/Wrap_and_Unwrap_AAD (0.00s) --- PASS: TestKeys/API_Key_Timeout (0.00s) --- PASS: TestKeys/Bad_Config (0.00s) --- PASS: TestKeys/Bad_API_Key (0.00s) --- PASS: TestKeys/Create_Key_Without_Expiration (0.00s) --- PASS: TestKeys/Create (0.00s) --- PASS: TestKeys/Rotate (0.00s) --- PASS: TestKeys/Get_Key (0.00s) --- PASS: TestKeys/Get_Key_Metadata (0.00s) --- PASS: TestKeys/Wrap_Unwrap (0.00s) --- PASS: TestKeys/Delete_Key (0.00s) --- PASS: TestKeys/Create_Standard_Key (0.00s) --- PASS: TestKeys/Create_Imported_Standard_Key (0.00s) === RUN TestMisc === RUN TestMisc/Redact_Values --- PASS: TestMisc (0.00s) --- PASS: TestMisc/Redact_Values (0.00s) === RUN TestImportTokens === RUN TestImportTokens/ImportToken_Create === RUN TestImportTokens/ImportToken_Get === RUN TestImportTokens/Assert_context_authorization_override === RUN TestImportTokens/Dump_Implementations --- PASS: TestImportTokens (0.00s) --- PASS: TestImportTokens/ImportToken_Create (0.00s) --- PASS: TestImportTokens/ImportToken_Get (0.00s) --- PASS: TestImportTokens/Assert_context_authorization_override (0.00s) --- PASS: TestImportTokens/Dump_Implementations (0.00s) === RUN TestKPCheckRetry === RUN TestKPCheckRetry/No_retry_on_successful_codes === RUN TestKPCheckRetry/No_retry_on_400-level_codes === RUN TestKPCheckRetry/Retry_on_429 === RUN TestKPCheckRetry/Retry_on_500+ === RUN TestKPCheckRetry/No_retry_on_501 === RUN TestKPCheckRetry/Retry_on_connection_failures === RUN TestKPCheckRetry/No_retry_on_context_failures --- PASS: TestKPCheckRetry (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_successful_codes (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_400-level_codes (0.00s) --- PASS: TestKPCheckRetry/Retry_on_429 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_500+ (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_501 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_connection_failures (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_context_failures (0.00s) === RUN TestDo_ConnectionError_HasCorrelationID --- PASS: TestDo_ConnectionError_HasCorrelationID (0.00s) === RUN TestDo_CorrelationID_Set --- PASS: TestDo_CorrelationID_Set (0.00s) === RUN TestDo_KPErrorResponseWithReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithReasons_IsErrorStruct (0.00s) === RUN TestDo_KPErrorResponseWithoutReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithoutReasons_IsErrorStruct (0.00s) === RUN TestDeleteKey_ForceOptTrue_URLHasForce --- PASS: TestDeleteKey_ForceOptTrue_URLHasForce (0.00s) === RUN TestDeleteKey_WithRegistrations_ErrorCases --- PASS: TestDeleteKey_WithRegistrations_ErrorCases (0.00s) === RUN TestRegistrationsList --- PASS: TestRegistrationsList (0.00s) === RUN TestRestoreKey --- PASS: TestRestoreKey (0.00s) === RUN TestSetAndGetMultipleInstancePolicies --- PASS: TestSetAndGetMultipleInstancePolicies (0.00s) === RUN TestSetAndGetDualAuthInstancePolicy --- PASS: TestSetAndGetDualAuthInstancePolicy (0.00s) === RUN TestSetAndGetAllowedNetworkPolicy --- PASS: TestSetAndGetAllowedNetworkPolicy (0.00s) === RUN TestSetAndGetAllowedIPInstancePolicy --- PASS: TestSetAndGetAllowedIPInstancePolicy (0.00s) === RUN TestSetAndGetKeyCreateImportAccessInstancePolicy --- PASS: TestSetAndGetKeyCreateImportAccessInstancePolicy (0.00s) === RUN TestSetMetricsPolicy --- PASS: TestSetMetricsPolicy (0.00s) === RUN TestSetAllowedIPPolicyError --- PASS: TestSetAllowedIPPolicyError (0.00s) === RUN TestGetPrivateEndpointPortNumber --- PASS: TestGetPrivateEndpointPortNumber (0.00s) === RUN TestSetInstanceDualAuthPolicyError --- PASS: TestSetInstanceDualAuthPolicyError (0.00s) === RUN TestSetKeyPolicies --- PASS: TestSetKeyPolicies (0.00s) === RUN TestGetKeyPolicies --- PASS: TestGetKeyPolicies (0.00s) === RUN TestDisableKey --- PASS: TestDisableKey (0.00s) === RUN TestEnableKey --- PASS: TestEnableKey (0.00s) === RUN TestInitiate_DualAuthDelete --- PASS: TestInitiate_DualAuthDelete (0.00s) === RUN TestCancel_DualAuthDelete --- PASS: TestCancel_DualAuthDelete (0.00s) === RUN TestCreateKeyRing --- PASS: TestCreateKeyRing (0.00s) === RUN TestDeleteKeyRing --- PASS: TestDeleteKeyRing (0.00s) === RUN TestGetKeyRings --- PASS: TestGetKeyRings (0.00s) === RUN TestCreateKeyWithAliases --- PASS: TestCreateKeyWithAliases (0.00s) === RUN TestCreateImportedKeyWithAliases --- PASS: TestCreateImportedKeyWithAliases (0.00s) === RUN TestCreateKeyAlias --- PASS: TestCreateKeyAlias (0.00s) === RUN TestDeleteKeyAlias --- PASS: TestDeleteKeyAlias (0.00s) === RUN TestGetKeyWithAlias --- PASS: TestGetKeyWithAlias (0.00s) === RUN TestGetKeyMetadataWithAlias --- PASS: TestGetKeyMetadataWithAlias (0.00s) PASS ok github.com/IBM/keyprotect-go-client 19.348s ? github.com/IBM/keyprotect-go-client/cmd/kp-token [no test files] === RUN TestToken_EmptyAPIKey_ReturnsError --- PASS: TestToken_EmptyAPIKey_ReturnsError (0.00s) === RUN TestToken_ValidToken_ReturnsCachedCopy --- PASS: TestToken_ValidToken_ReturnsCachedCopy (0.00s) === RUN TestToken_InvalidToken_ReturnsNewToken --- PASS: TestToken_InvalidToken_ReturnsNewToken (0.00s) === RUN TestValid_NotExpired_ReturnsTrue --- PASS: TestValid_NotExpired_ReturnsTrue (0.00s) === RUN TestValid_Expired_ReturnsFalse --- PASS: TestValid_Expired_ReturnsFalse (0.00s) === RUN TestValid_EmptyAccessToken_ReturnsFalse --- PASS: TestValid_EmptyAccessToken_ReturnsFalse (0.00s) === RUN TestValid_NilToken_ReturnsFalse --- PASS: TestValid_NilToken_ReturnsFalse (0.00s) === RUN TestError_NilContextOrResp_NoNilDeref --- PASS: TestError_NilContextOrResp_NoNilDeref (0.00s) PASS ok github.com/IBM/keyprotect-go-client/iam (cached) ```
Looks like this needs a rebase
This PR is covered as part of https://github.com/IBM/keyprotect-go-client/pull/67
Updated the go version to 1.17 for the key protect sdk.
test result of kp_test.go
``` ektabharti@Ektas-MacBook-Pro keyprotect-go-client % go test -v === RUN TestKeys === RUN TestKeys/New_API === RUN TestKeys/New_API_with_Logger === RUN TestKeys/Timeout === RUN TestKeys/Get_Keys === RUN TestKeys/Wrap_Create_DEK === RUN TestKeys/Wrap_Unwrap_v2 === RUN TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone === RUN TestKeys/Imported_Create_Delete === RUN TestKeys/Create_Delete === RUN TestKeys/Imported_Rotate === RUN TestKeys/Imported_Rotate_Unwrap === RUN TestKeys/Rotate_Unwrap === RUN TestKeys/Timeout#01 === RUN TestKeys/Auth_Context === RUN TestKeys/Auth_in_Config === RUN TestKeys/Wrap_and_Unwrap_AAD === RUN TestKeys/API_Key_Timeout === RUN TestKeys/Bad_Config === RUN TestKeys/Bad_API_Key === RUN TestKeys/Create_Key_Without_Expiration === RUN TestKeys/Create === RUN TestKeys/Rotate === RUN TestKeys/Get_Key === RUN TestKeys/Get_Key_Metadata === RUN TestKeys/Wrap_Unwrap === RUN TestKeys/Delete_Key === RUN TestKeys/Create_Standard_Key === RUN TestKeys/Create_Imported_Standard_Key --- PASS: TestKeys (0.02s) --- PASS: TestKeys/New_API (0.00s) --- PASS: TestKeys/New_API_with_Logger (0.00s) --- PASS: TestKeys/Timeout (0.00s) --- PASS: TestKeys/Get_Keys (0.00s) --- PASS: TestKeys/Wrap_Create_DEK (0.00s) --- PASS: TestKeys/Wrap_Unwrap_v2 (0.00s) --- PASS: TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone (0.00s) --- PASS: TestKeys/Imported_Create_Delete (0.00s) --- PASS: TestKeys/Create_Delete (0.00s) --- PASS: TestKeys/Imported_Rotate (0.00s) --- PASS: TestKeys/Imported_Rotate_Unwrap (0.00s) --- PASS: TestKeys/Rotate_Unwrap (0.00s) --- PASS: TestKeys/Timeout#01 (0.00s) --- PASS: TestKeys/Auth_Context (0.00s) --- PASS: TestKeys/Auth_in_Config (0.00s) --- PASS: TestKeys/Wrap_and_Unwrap_AAD (0.00s) --- PASS: TestKeys/API_Key_Timeout (0.00s) --- PASS: TestKeys/Bad_Config (0.00s) --- PASS: TestKeys/Bad_API_Key (0.00s) --- PASS: TestKeys/Create_Key_Without_Expiration (0.00s) --- PASS: TestKeys/Create (0.00s) --- PASS: TestKeys/Rotate (0.00s) --- PASS: TestKeys/Get_Key (0.00s) --- PASS: TestKeys/Get_Key_Metadata (0.00s) --- PASS: TestKeys/Wrap_Unwrap (0.00s) --- PASS: TestKeys/Delete_Key (0.00s) --- PASS: TestKeys/Create_Standard_Key (0.00s) --- PASS: TestKeys/Create_Imported_Standard_Key (0.00s) === RUN TestMisc === RUN TestMisc/Redact_Values --- PASS: TestMisc (0.00s) --- PASS: TestMisc/Redact_Values (0.00s) === RUN TestImportTokens === RUN TestImportTokens/ImportToken_Create === RUN TestImportTokens/ImportToken_Get === RUN TestImportTokens/Assert_context_authorization_override === RUN TestImportTokens/Dump_Implementations --- PASS: TestImportTokens (0.00s) --- PASS: TestImportTokens/ImportToken_Create (0.00s) --- PASS: TestImportTokens/ImportToken_Get (0.00s) --- PASS: TestImportTokens/Assert_context_authorization_override (0.00s) --- PASS: TestImportTokens/Dump_Implementations (0.00s) === RUN TestKPCheckRetry === RUN TestKPCheckRetry/No_retry_on_successful_codes === RUN TestKPCheckRetry/No_retry_on_400-level_codes === RUN TestKPCheckRetry/Retry_on_429 === RUN TestKPCheckRetry/Retry_on_500+ === RUN TestKPCheckRetry/No_retry_on_501 === RUN TestKPCheckRetry/Retry_on_connection_failures === RUN TestKPCheckRetry/No_retry_on_context_failures --- PASS: TestKPCheckRetry (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_successful_codes (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_400-level_codes (0.00s) --- PASS: TestKPCheckRetry/Retry_on_429 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_500+ (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_501 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_connection_failures (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_context_failures (0.00s) === RUN TestDo_ConnectionError_HasCorrelationID --- PASS: TestDo_ConnectionError_HasCorrelationID (0.00s) === RUN TestDo_CorrelationID_Set --- PASS: TestDo_CorrelationID_Set (0.00s) === RUN TestDo_KPErrorResponseWithReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithReasons_IsErrorStruct (0.00s) === RUN TestDo_KPErrorResponseWithoutReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithoutReasons_IsErrorStruct (0.00s) === RUN TestDeleteKey_ForceOptTrue_URLHasForce --- PASS: TestDeleteKey_ForceOptTrue_URLHasForce (0.00s) === RUN TestDeleteKey_WithRegistrations_ErrorCases --- PASS: TestDeleteKey_WithRegistrations_ErrorCases (0.00s) === RUN TestRegistrationsList --- PASS: TestRegistrationsList (0.00s) === RUN TestRestoreKey --- PASS: TestRestoreKey (0.00s) === RUN TestSetAndGetMultipleInstancePolicies --- PASS: TestSetAndGetMultipleInstancePolicies (0.00s) === RUN TestSetAndGetDualAuthInstancePolicy --- PASS: TestSetAndGetDualAuthInstancePolicy (0.00s) === RUN TestSetAndGetAllowedNetworkPolicy --- PASS: TestSetAndGetAllowedNetworkPolicy (0.00s) === RUN TestSetAndGetAllowedIPInstancePolicy --- PASS: TestSetAndGetAllowedIPInstancePolicy (0.00s) === RUN TestSetAndGetKeyCreateImportAccessInstancePolicy --- PASS: TestSetAndGetKeyCreateImportAccessInstancePolicy (0.00s) === RUN TestSetMetricsPolicy --- PASS: TestSetMetricsPolicy (0.00s) === RUN TestSetAllowedIPPolicyError --- PASS: TestSetAllowedIPPolicyError (0.00s) === RUN TestGetPrivateEndpointPortNumber --- PASS: TestGetPrivateEndpointPortNumber (0.00s) === RUN TestSetInstanceDualAuthPolicyError --- PASS: TestSetInstanceDualAuthPolicyError (0.00s) === RUN TestSetKeyPolicies --- PASS: TestSetKeyPolicies (0.00s) === RUN TestGetKeyPolicies --- PASS: TestGetKeyPolicies (0.00s) === RUN TestDisableKey --- PASS: TestDisableKey (0.00s) === RUN TestEnableKey --- PASS: TestEnableKey (0.00s) === RUN TestInitiate_DualAuthDelete --- PASS: TestInitiate_DualAuthDelete (0.00s) === RUN TestCancel_DualAuthDelete --- PASS: TestCancel_DualAuthDelete (0.00s) === RUN TestCreateKeyRing --- PASS: TestCreateKeyRing (0.00s) === RUN TestDeleteKeyRing --- PASS: TestDeleteKeyRing (0.00s) === RUN TestGetKeyRings --- PASS: TestGetKeyRings (0.00s) === RUN TestCreateKeyWithAliases --- PASS: TestCreateKeyWithAliases (0.00s) === RUN TestCreateImportedKeyWithAliases --- PASS: TestCreateImportedKeyWithAliases (0.00s) === RUN TestCreateKeyAlias --- PASS: TestCreateKeyAlias (0.00s) === RUN TestDeleteKeyAlias --- PASS: TestDeleteKeyAlias (0.00s) === RUN TestGetKeyWithAlias --- PASS: TestGetKeyWithAlias (0.00s) === RUN TestGetKeyMetadataWithAlias --- PASS: TestGetKeyMetadataWithAlias (0.00s) PASS ok github.com/IBM/keyprotect-go-client 0.526s ```
test result of integration and unit tests
``` ektabharti@Ektas-MacBook-Pro keyprotect-go-client % go test -v -tags=integration ./... === RUN TestWrapUnwrap integration_test.go:85: CRK created successfully: id=778a2814-632c-45d3-bb07-4df58b5f3d01 integration_test.go:102: Key deleted: id=778a2814-632c-45d3-bb07-4df58b5f3d01 --- PASS: TestWrapUnwrap (6.03s) === RUN TestRotatedKeyHasLastUpdatedAndRotated integration_test.go:125: CRK created successfully: id=02e199be-3e4a-4338-b41e-fa08af2482f7 integration_test.go:132: CRK rotated successfully: id=02e199be-3e4a-4338-b41e-fa08af2482f7 integration_test.go:148: Key deleted: id=02e199be-3e4a-4338-b41e-fa08af2482f7 --- PASS: TestRotatedKeyHasLastUpdatedAndRotated (6.89s) === RUN TestExtractableKey integration_test.go:177: CRK created successfully: id=210752b0-67fa-4d0e-a85d-70d98cfca0bc --- PASS: TestExtractableKey (6.11s) === RUN TestKeys === RUN TestKeys/New_API === RUN TestKeys/New_API_with_Logger === RUN TestKeys/Timeout === RUN TestKeys/Get_Keys === RUN TestKeys/Wrap_Create_DEK === RUN TestKeys/Wrap_Unwrap_v2 === RUN TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone === RUN TestKeys/Imported_Create_Delete === RUN TestKeys/Create_Delete === RUN TestKeys/Imported_Rotate === RUN TestKeys/Imported_Rotate_Unwrap === RUN TestKeys/Rotate_Unwrap === RUN TestKeys/Timeout#01 === RUN TestKeys/Auth_Context === RUN TestKeys/Auth_in_Config === RUN TestKeys/Wrap_and_Unwrap_AAD === RUN TestKeys/API_Key_Timeout === RUN TestKeys/Bad_Config === RUN TestKeys/Bad_API_Key === RUN TestKeys/Create_Key_Without_Expiration === RUN TestKeys/Create === RUN TestKeys/Rotate === RUN TestKeys/Get_Key === RUN TestKeys/Get_Key_Metadata === RUN TestKeys/Wrap_Unwrap === RUN TestKeys/Delete_Key === RUN TestKeys/Create_Standard_Key === RUN TestKeys/Create_Imported_Standard_Key --- PASS: TestKeys (0.02s) --- PASS: TestKeys/New_API (0.00s) --- PASS: TestKeys/New_API_with_Logger (0.00s) --- PASS: TestKeys/Timeout (0.00s) --- PASS: TestKeys/Get_Keys (0.00s) --- PASS: TestKeys/Wrap_Create_DEK (0.00s) --- PASS: TestKeys/Wrap_Unwrap_v2 (0.00s) --- PASS: TestKeys/Unwrap_on_Deleted_should_return_err_with_410_Gone (0.00s) --- PASS: TestKeys/Imported_Create_Delete (0.00s) --- PASS: TestKeys/Create_Delete (0.00s) --- PASS: TestKeys/Imported_Rotate (0.00s) --- PASS: TestKeys/Imported_Rotate_Unwrap (0.00s) --- PASS: TestKeys/Rotate_Unwrap (0.00s) --- PASS: TestKeys/Timeout#01 (0.00s) --- PASS: TestKeys/Auth_Context (0.00s) --- PASS: TestKeys/Auth_in_Config (0.00s) --- PASS: TestKeys/Wrap_and_Unwrap_AAD (0.00s) --- PASS: TestKeys/API_Key_Timeout (0.00s) --- PASS: TestKeys/Bad_Config (0.00s) --- PASS: TestKeys/Bad_API_Key (0.00s) --- PASS: TestKeys/Create_Key_Without_Expiration (0.00s) --- PASS: TestKeys/Create (0.00s) --- PASS: TestKeys/Rotate (0.00s) --- PASS: TestKeys/Get_Key (0.00s) --- PASS: TestKeys/Get_Key_Metadata (0.00s) --- PASS: TestKeys/Wrap_Unwrap (0.00s) --- PASS: TestKeys/Delete_Key (0.00s) --- PASS: TestKeys/Create_Standard_Key (0.00s) --- PASS: TestKeys/Create_Imported_Standard_Key (0.00s) === RUN TestMisc === RUN TestMisc/Redact_Values --- PASS: TestMisc (0.00s) --- PASS: TestMisc/Redact_Values (0.00s) === RUN TestImportTokens === RUN TestImportTokens/ImportToken_Create === RUN TestImportTokens/ImportToken_Get === RUN TestImportTokens/Assert_context_authorization_override === RUN TestImportTokens/Dump_Implementations --- PASS: TestImportTokens (0.00s) --- PASS: TestImportTokens/ImportToken_Create (0.00s) --- PASS: TestImportTokens/ImportToken_Get (0.00s) --- PASS: TestImportTokens/Assert_context_authorization_override (0.00s) --- PASS: TestImportTokens/Dump_Implementations (0.00s) === RUN TestKPCheckRetry === RUN TestKPCheckRetry/No_retry_on_successful_codes === RUN TestKPCheckRetry/No_retry_on_400-level_codes === RUN TestKPCheckRetry/Retry_on_429 === RUN TestKPCheckRetry/Retry_on_500+ === RUN TestKPCheckRetry/No_retry_on_501 === RUN TestKPCheckRetry/Retry_on_connection_failures === RUN TestKPCheckRetry/No_retry_on_context_failures --- PASS: TestKPCheckRetry (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_successful_codes (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_400-level_codes (0.00s) --- PASS: TestKPCheckRetry/Retry_on_429 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_500+ (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_501 (0.00s) --- PASS: TestKPCheckRetry/Retry_on_connection_failures (0.00s) --- PASS: TestKPCheckRetry/No_retry_on_context_failures (0.00s) === RUN TestDo_ConnectionError_HasCorrelationID --- PASS: TestDo_ConnectionError_HasCorrelationID (0.00s) === RUN TestDo_CorrelationID_Set --- PASS: TestDo_CorrelationID_Set (0.00s) === RUN TestDo_KPErrorResponseWithReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithReasons_IsErrorStruct (0.00s) === RUN TestDo_KPErrorResponseWithoutReasons_IsErrorStruct --- PASS: TestDo_KPErrorResponseWithoutReasons_IsErrorStruct (0.00s) === RUN TestDeleteKey_ForceOptTrue_URLHasForce --- PASS: TestDeleteKey_ForceOptTrue_URLHasForce (0.00s) === RUN TestDeleteKey_WithRegistrations_ErrorCases --- PASS: TestDeleteKey_WithRegistrations_ErrorCases (0.00s) === RUN TestRegistrationsList --- PASS: TestRegistrationsList (0.00s) === RUN TestRestoreKey --- PASS: TestRestoreKey (0.00s) === RUN TestSetAndGetMultipleInstancePolicies --- PASS: TestSetAndGetMultipleInstancePolicies (0.00s) === RUN TestSetAndGetDualAuthInstancePolicy --- PASS: TestSetAndGetDualAuthInstancePolicy (0.00s) === RUN TestSetAndGetAllowedNetworkPolicy --- PASS: TestSetAndGetAllowedNetworkPolicy (0.00s) === RUN TestSetAndGetAllowedIPInstancePolicy --- PASS: TestSetAndGetAllowedIPInstancePolicy (0.00s) === RUN TestSetAndGetKeyCreateImportAccessInstancePolicy --- PASS: TestSetAndGetKeyCreateImportAccessInstancePolicy (0.00s) === RUN TestSetMetricsPolicy --- PASS: TestSetMetricsPolicy (0.00s) === RUN TestSetAllowedIPPolicyError --- PASS: TestSetAllowedIPPolicyError (0.00s) === RUN TestGetPrivateEndpointPortNumber --- PASS: TestGetPrivateEndpointPortNumber (0.00s) === RUN TestSetInstanceDualAuthPolicyError --- PASS: TestSetInstanceDualAuthPolicyError (0.00s) === RUN TestSetKeyPolicies --- PASS: TestSetKeyPolicies (0.00s) === RUN TestGetKeyPolicies --- PASS: TestGetKeyPolicies (0.00s) === RUN TestDisableKey --- PASS: TestDisableKey (0.00s) === RUN TestEnableKey --- PASS: TestEnableKey (0.00s) === RUN TestInitiate_DualAuthDelete --- PASS: TestInitiate_DualAuthDelete (0.00s) === RUN TestCancel_DualAuthDelete --- PASS: TestCancel_DualAuthDelete (0.00s) === RUN TestCreateKeyRing --- PASS: TestCreateKeyRing (0.00s) === RUN TestDeleteKeyRing --- PASS: TestDeleteKeyRing (0.00s) === RUN TestGetKeyRings --- PASS: TestGetKeyRings (0.00s) === RUN TestCreateKeyWithAliases --- PASS: TestCreateKeyWithAliases (0.00s) === RUN TestCreateImportedKeyWithAliases --- PASS: TestCreateImportedKeyWithAliases (0.00s) === RUN TestCreateKeyAlias --- PASS: TestCreateKeyAlias (0.00s) === RUN TestDeleteKeyAlias --- PASS: TestDeleteKeyAlias (0.00s) === RUN TestGetKeyWithAlias --- PASS: TestGetKeyWithAlias (0.00s) === RUN TestGetKeyMetadataWithAlias --- PASS: TestGetKeyMetadataWithAlias (0.00s) PASS ok github.com/IBM/keyprotect-go-client 19.348s ? github.com/IBM/keyprotect-go-client/cmd/kp-token [no test files] === RUN TestToken_EmptyAPIKey_ReturnsError --- PASS: TestToken_EmptyAPIKey_ReturnsError (0.00s) === RUN TestToken_ValidToken_ReturnsCachedCopy --- PASS: TestToken_ValidToken_ReturnsCachedCopy (0.00s) === RUN TestToken_InvalidToken_ReturnsNewToken --- PASS: TestToken_InvalidToken_ReturnsNewToken (0.00s) === RUN TestValid_NotExpired_ReturnsTrue --- PASS: TestValid_NotExpired_ReturnsTrue (0.00s) === RUN TestValid_Expired_ReturnsFalse --- PASS: TestValid_Expired_ReturnsFalse (0.00s) === RUN TestValid_EmptyAccessToken_ReturnsFalse --- PASS: TestValid_EmptyAccessToken_ReturnsFalse (0.00s) === RUN TestValid_NilToken_ReturnsFalse --- PASS: TestValid_NilToken_ReturnsFalse (0.00s) === RUN TestError_NilContextOrResp_NoNilDeref --- PASS: TestError_NilContextOrResp_NoNilDeref (0.00s) PASS ok github.com/IBM/keyprotect-go-client/iam (cached) ```