Skip to content

Commit de4bd12

Browse files
copilot suggestions
1 parent 47e4bef commit de4bd12

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cloudstack/provider_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ func testAccPreCheck(t *testing.T) {
148148

149149
// getCloudStackVersion returns the CloudStack version from the API
150150
func getCloudStackVersion(t *testing.T) string {
151+
t.Helper()
152+
151153
cfg := Config{
152154
APIURL: os.Getenv("CLOUDSTACK_API_URL"),
153155
APIKey: os.Getenv("CLOUDSTACK_API_KEY"),
@@ -157,15 +159,13 @@ func getCloudStackVersion(t *testing.T) string {
157159
}
158160
cs, err := cfg.NewClient()
159161
if err != nil {
160-
t.Logf("Failed to create CloudStack client: %v", err)
161-
return ""
162+
t.Fatalf("Failed to create CloudStack client: %v", err)
162163
}
163164

164165
p := cs.Configuration.NewListCapabilitiesParams()
165166
r, err := cs.Configuration.ListCapabilities(p)
166167
if err != nil {
167-
t.Logf("Failed to get CloudStack capabilities: %v", err)
168-
return ""
168+
t.Fatalf("Failed to get CloudStack capabilities: %v", err)
169169
}
170170

171171
if r.Capabilities != nil {

cloudstack/resource_cloudstack_loadbalancer_rule_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ func TestAccCloudStackLoadBalancerRule_update(t *testing.T) {
5757
// Skip this test on CloudStack 4.22.0.0 due to a known simulator bug
5858
// that causes "530 Internal Server Error" when updating load balancer rules.
5959
// This bug does not exist in 4.20.1.0, 4.22.1.0+, or 4.23.0.0+.
60-
// See: https://github.com/apache/cloudstack/issues/XXXXX (if applicable)
6160
testAccPreCheck(t)
6261
version := getCloudStackVersion(t)
6362
if version == "4.22.0.0" {

0 commit comments

Comments
 (0)