Skip to content

Commit

Permalink
pass test
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnleelhl committed Nov 8, 2023
1 parent 5d77954 commit db0a103
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions pkg/cli/cmd/context/cloud_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ func mockServer() *httptest.Server {
switch r.Method {
case http.MethodGet:
cloudContextResponse := CloudContextResponse{
APIVersion: "test_api_version",
Kind: "test_kind",
Metadata: Metadata{
Name: "test_context",
},
Name: "test_context",
}
jsonData, err := json.Marshal(cloudContextResponse)
if err != nil {
Expand All @@ -60,15 +56,9 @@ func mockServer() *httptest.Server {
}

case "/api/v1/organizations/test_org/contexts":
cloudContextsResponse := CloudContextsResponse{
APIVersion: "test_api_version",
Kind: "test_kind",
Items: []ClusterItem{
{
Metadata: Metadata{
Name: "test_context",
},
},
cloudContextsResponse := []CloudContextResponse{
{
Name: "test_context",
},
}
jsonData, err := json.Marshal(cloudContextsResponse)
Expand Down

0 comments on commit db0a103

Please sign in to comment.