From 188f3e195d2eb27a21c9d207e8e4c1c89c0927ce Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Fri, 8 Nov 2024 17:59:52 +0530 Subject: [PATCH] get new context --- go.mod | 2 +- go.sum | 2 ++ internal/acceptance_test/helper.go | 2 +- pkg/utils/meta.go | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 683c9086..9444e7e4 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/HewlettPackard/hpegl-vmaas-terraform-resources go 1.21 require ( - github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108090636-05469301103d + github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108120641-109a1767b156 github.com/golang/mock v1.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-docs v0.9.0 diff --git a/go.sum b/go.sum index 6b03e85a..807ca7fc 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.16 h1:AxP9A1zwr8L7kahiiKOB github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.16/go.mod h1:tsKOAAbEQnpXAzqjcZUGzRiVp9QfRViKoTOdIltIMFI= github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108090636-05469301103d h1:0J7uB3CnWUqiyGVM4utguQ861TAU6/KPkj1S+bK0vyA= github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108090636-05469301103d/go.mod h1:tsKOAAbEQnpXAzqjcZUGzRiVp9QfRViKoTOdIltIMFI= +github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108120641-109a1767b156 h1:HdWMC4UjeYTL4H3YAw6wCBSeXZhI91ivg9Ewf5oN9Ks= +github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.17-0.20241108120641-109a1767b156/go.mod h1:tsKOAAbEQnpXAzqjcZUGzRiVp9QfRViKoTOdIltIMFI= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= diff --git a/internal/acceptance_test/helper.go b/internal/acceptance_test/helper.go index d4dc9f46..3026eb4c 100644 --- a/internal/acceptance_test/helper.go +++ b/internal/acceptance_test/helper.go @@ -70,7 +70,7 @@ func getAPIClient() (*api_client.APIClient, api_client.Configuration) { token := cmpAPIClient.CMPToken // Token is about to expire and get new if tokenExpiry <= time.Now().Unix() { - cmpDetails, err := brokerClient.GetCMPDetails(*ctx) + cmpDetails, err := brokerClient.GetCMPDetails(context.Background()) if err != nil { log.Printf("[ERROR] Unable to fetch token for CMP client: %s", err) panic("Unable to renew token") diff --git a/pkg/utils/meta.go b/pkg/utils/meta.go index 28f4579f..d9366ce2 100644 --- a/pkg/utils/meta.go +++ b/pkg/utils/meta.go @@ -68,7 +68,7 @@ func SetCMPVars(apiClient, brokerClient *client.APIClient, cfg *client.Configura token := apiClient.CMPToken // Token is about to expire and get new if tokenExpiry <= time.Now().Unix() { - cmpDetails, err := brokerClient.GetCMPDetails(*ctx) + cmpDetails, err := brokerClient.GetCMPDetails(context.Background()) if err != nil { log.Printf("[ERROR] Unable to fetch token for CMP client: %s", err) panic("Unable to renew token")