Skip to content

Commit

Permalink
get new context
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hpe committed Nov 8, 2024
1 parent 6be23e8 commit 188f3e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion internal/acceptance_test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 188f3e1

Please sign in to comment.