(t *testing.T)
| 26 | ) |
| 27 | |
| 28 | func TestMetricsService(t *testing.T) { |
| 29 | service := "MetricsService" |
| 30 | response, err := readData(service) |
| 31 | if err != nil { |
| 32 | t.Skipf("Skipping test as %v", err) |
| 33 | } |
| 34 | server := CreateTestServer(t, response) |
| 35 | client := cloudstack.NewClient(server.URL, "APIKEY", "SECRETKEY", true) |
| 36 | defer server.Close() |
| 37 | |
| 38 | testlistInfrastructure := func(t *testing.T) { |
| 39 | if _, ok := response["listInfrastructure"]; !ok { |
| 40 | t.Skipf("Skipping as no json response is provided in testdata") |
| 41 | } |
| 42 | p := client.Metrics.NewListInfrastructureParams() |
| 43 | _, err := client.Metrics.ListInfrastructure(p) |
| 44 | if err != nil { |
| 45 | t.Errorf(err.Error()) |
| 46 | } |
| 47 | } |
| 48 | t.Run("ListInfrastructure", testlistInfrastructure) |
| 49 | |
| 50 | } |
nothing calls this directly
no test coverage detected