-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We add an acceptance test to internal/acceptance_test. We've had to add a new helper function getBrokerAPIClient() and move some shared code into getHeadersAndQueryParamsAndIAMVersion() and apiClientSetMeta().
- Loading branch information
1 parent
4477391
commit 8412fd1
Showing
2 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP | ||
|
||
package acceptancetest | ||
|
||
import ( | ||
"testing" | ||
|
||
api_client "github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk/pkg/client" | ||
"github.com/HewlettPackard/hpegl-vmaas-terraform-resources/pkg/atf" | ||
) | ||
|
||
func TestAccDataSourceMorpheusDetails(t *testing.T) { | ||
acc := &atf.Acc{ | ||
PreCheck: testAccPreCheck, | ||
Providers: testAccProviders, | ||
ResourceName: "hpegl_vmaas_morpheus_details", | ||
GetAPI: func(attr map[string]string) (interface{}, error) { | ||
cl, cfg := getBrokerAPIClient() | ||
iClient := api_client.BrokerAPIService{ | ||
Client: cl, | ||
Cfg: cfg, | ||
} | ||
|
||
return iClient.GetMorpheusDetails(getAccContext()) | ||
}, | ||
} | ||
|
||
acc.RunDataSourceTests(t) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters