Skip to content

Commit ef28888

Browse files
committed
remove old sdk from test helper
1 parent b4164c2 commit ef28888

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

test/helper/e2e/api/atlas/atlas.go

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ import (
3232
var globalAtlas *Atlas
3333

3434
type Atlas struct {
35-
OrgID string
36-
Public string
37-
Private string
38-
Client *admin.APIClient
39-
ClientV20241113001 *admin.APIClient
35+
OrgID string
36+
Public string
37+
Private string
38+
Client *admin.APIClient
4039
}
4140

4241
func AClient() (Atlas, error) {
@@ -52,15 +51,6 @@ func AClient() (Atlas, error) {
5251
}
5352
a.Client = c
5453

55-
clientV20241113001, err := admin.NewClient(
56-
admin.UseBaseURL(os.Getenv("MCLI_OPS_MANAGER_URL")),
57-
admin.UseDigestAuth(a.Public, a.Private),
58-
)
59-
if err != nil {
60-
return Atlas{}, err
61-
}
62-
a.ClientV20241113001 = clientV20241113001
63-
6454
return a, nil
6555
}
6656

@@ -107,7 +97,7 @@ func (a *Atlas) GetDeploymentNames(projectID string) []string {
10797
for _, cluster := range clusters.GetResults() {
10898
names = append(names, cluster.GetName())
10999
}
110-
flex, _, err := a.ClientV20241113001.FlexClustersApi.ListFlexClusters(ctx, projectID).Execute()
100+
flex, _, err := a.Client.FlexClustersApi.ListFlexClusters(ctx, projectID).Execute()
111101
Expect(err).NotTo(HaveOccurred())
112102
ginkgoPrettyPrintf(flex.GetResults(), "listing flex deployments in project %s", projectID)
113103
for _, cluster := range flex.GetResults() {
@@ -127,7 +117,7 @@ func (a *Atlas) GetDeployment(projectId, deploymentName string) (*admin.ClusterD
127117
}
128118

129119
func (a *Atlas) GetFlexInstance(projectId, deploymentName string) (*admin.FlexClusterDescription20241113, error) {
130-
flexInstance, _, err := a.ClientV20241113001.FlexClustersApi.
120+
flexInstance, _, err := a.Client.FlexClustersApi.
131121
GetFlexCluster(context.Background(), projectId, deploymentName).
132122
Execute()
133123

0 commit comments

Comments
 (0)