Skip to content

Commit 4b7a08a

Browse files
authored
Merge pull request #811 from gitlabhq/fix-group-variable-test
Fix group variable test
2 parents 8dde2e7 + e6ebb4c commit 4b7a08a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

gitlab/provider_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package gitlab
22

33
import (
44
"context"
5+
"fmt"
56
"os"
67
"testing"
78

@@ -17,7 +18,7 @@ func init() {
1718
if os.Getenv(resource.TestEnvVar) != "" {
1819
testAccProvider = Provider()
1920
if err := testAccProvider.Configure(context.TODO(), &terraform.ResourceConfig{}); err != nil {
20-
panic(err) // lintignore: R009 // TODO: Resolve this tfproviderlint issue
21+
panic(fmt.Sprintf("%#v", err)) // lintignore: R009 // TODO: Resolve this tfproviderlint issue
2122
}
2223
testAccProviders = map[string]*schema.Provider{
2324
"gitlab": testAccProvider,

gitlab/resource_gitlab_group_variable_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func testAccCheckGitlabGroupVariableExists(n string, groupVariable *gitlab.Group
148148
}
149149
conn := testAccProvider.Meta().(*gitlab.Client)
150150

151-
gotVariable, _, err := conn.GroupVariables.GetVariable(repoName, key)
151+
gotVariable, _, err := conn.GroupVariables.GetVariable(repoName, key, modifyRequestAddEnvironmentFilter(rs.Primary.Attributes["environment_scope"]))
152152
if err != nil {
153153
return err
154154
}

0 commit comments

Comments
 (0)