Skip to content

Commit d1943b5

Browse files
authored
tests: fixed error handling in pr test (#90)
1 parent c43ea76 commit d1943b5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/pr_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ func createContainersApikey(t *testing.T, region string, rg string) {
6666
// TestMain will be run before any parallel tests, used to set up a shared InfoService object to track region usage
6767
// for multiple tests
6868
func TestMain(m *testing.M) {
69-
sharedInfoSvc, _ = cloudinfo.NewCloudInfoServiceFromEnv("TF_VAR_ibmcloud_api_key", cloudinfo.CloudInfoServiceOptions{})
70-
7169
var err error
70+
sharedInfoSvc, err = cloudinfo.NewCloudInfoServiceFromEnv("TF_VAR_ibmcloud_api_key", cloudinfo.CloudInfoServiceOptions{})
71+
if err != nil {
72+
log.Fatal(err)
73+
}
74+
7275
permanentResources, err = common.LoadMapFromYaml(yamlLocation)
7376
if err != nil {
7477
log.Fatal(err)

0 commit comments

Comments
 (0)