Skip to content

Commit 6e5ab46

Browse files
committed
Fix repo test
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent 443206b commit 6e5ab46

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

github/resource_github_repository_test.go

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ resource "github_repository" "test" {
704704
{
705705
Config: config,
706706
Check: resource.ComposeTestCheckFunc(
707-
resource.TestCheckResourceAttrSet("github_repository.test", "vulnerability_alerts"),
707+
resource.TestCheckNoResourceAttr("github_repository.test", "vulnerability_alerts"),
708708
),
709709
},
710710
},
@@ -1170,9 +1170,8 @@ resource "github_repository" "test" {
11701170

11711171
checks := map[string]resource.TestCheckFunc{
11721172
"before": resource.ComposeTestCheckFunc(
1173-
resource.TestCheckResourceAttr(
1173+
resource.TestCheckNoResourceAttr(
11741174
"github_repository.test", "vulnerability_alerts",
1175-
"false",
11761175
),
11771176
),
11781177
"after": resource.ComposeTestCheckFunc(
@@ -1217,20 +1216,11 @@ resource "github_repository" "test" {
12171216

12181217
checks := map[string]resource.TestCheckFunc{
12191218
"before": resource.ComposeTestCheckFunc(
1220-
resource.TestCheckResourceAttr(
1221-
"github_repository.test", "vulnerability_alerts",
1222-
"false",
1223-
),
1219+
resource.TestCheckNoResourceAttr("github_repository.test", "vulnerability_alerts"),
12241220
),
12251221
"after": resource.ComposeTestCheckFunc(
1226-
resource.TestCheckResourceAttr(
1227-
"github_repository.test", "vulnerability_alerts",
1228-
"true",
1229-
),
1230-
resource.TestCheckResourceAttr(
1231-
"github_repository.test", "visibility",
1232-
"private",
1233-
),
1222+
resource.TestCheckResourceAttr("github_repository.test", "vulnerability_alerts", "true"),
1223+
resource.TestCheckResourceAttr("github_repository.test", "visibility", "private"),
12341224
),
12351225
}
12361226

0 commit comments

Comments
 (0)