-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert permission target resource back to SDKv2 version #842
Conversation
@@ -439,8 +434,7 @@ func TestAccPermissionTarget_addBuild(t *testing.T) { | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.actions.0.users.#", "1"), | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.actions.0.groups.#", "0"), | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.repositories.#", "1"), | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.includes_pattern.#", "1"), | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.includes_pattern.0", "**"), | |||
resource.TestCheckResourceAttr(permFqrn, "repo.0.includes_pattern.#", "0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDKv2 doesn't allow setting default values for "set" attribute. 😞
@@ -159,15 +159,12 @@ const testLength = ` | |||
repo { | |||
includes_pattern = ["foo/**"] | |||
repositories = ["{{ .repo_name }}"] | |||
actions { | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions
is an optional field in the API so I don't know why test for empty attribute. Can be framework related.
} | ||
|
||
entityDataList := rawEntityData.([]interface{}) | ||
if len(entityDataList) == 0 || entityDataList[0] == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add additional nil check to prevent crash
close #757, #805