Allow to get only protected on non protected branch with github_repository_branches#1296
Allow to get only protected on non protected branch with github_repository_branches#1296kfcampbell merged 4 commits intointegrations:mainfrom
Conversation
…itory_branches Remove leftover code and doc after integrations#1117 Reintroduce the feature from integrations#1162 with integration tests
|
@kfcampbell The feature I added in #1162 was lost :( |
kfcampbell
left a comment
There was a problem hiding this comment.
Thanks for catching this and following up! I had a couple quick questions, and I'm hoping we can get this into a release soon.
| }) | ||
|
|
||
| t.Run("with an individual account", func(t *testing.T) { | ||
| testCase(t, individual) |
There was a problem hiding this comment.
This test is failing for me for an individual account but passing for an organization account. Is it succeeding for you when running locally?
There was a problem hiding this comment.
Locally it only run with an organization account. And is ok
$ TF_ACC=1 go test -v ./... -run ^TestAccGithubRepositoryBranchesDataSource
? github.com/integrations/terraform-provider-github/v5 [no test files]
=== RUN TestAccGithubRepositoryBranchesDataSource
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_anonymous_account
data_source_github_repository_branches_test.go:46: anonymous account not supported for this operation
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_individual_account
provider_utils.go:56: GITHUB_TOKEN and GITHUB_OWNER environment variables should be set
provider_utils.go:66: Skipping TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_individual_account which requires individual mode
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_organization_account
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_anonymous_account
data_source_github_repository_branches_test.go:125: anonymous account not supported for this operation
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_individual_account
provider_utils.go:56: GITHUB_TOKEN and GITHUB_OWNER environment variables should be set
provider_utils.go:66: Skipping TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_individual_account which requires individual mode
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_organization_account
--- PASS: TestAccGithubRepositoryBranchesDataSource (28.78s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository (7.96s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_individual_account (0.00s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_organization_account (7.96s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering (20.82s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_individual_account (0.00s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_organization_account (20.82s)
PASS
ok github.com/integrations/terraform-provider-github/v5/github 29.454s
There was a problem hiding this comment.
Individal test is ok too:
$ TF_ACC=1 go test -v ./... -run ^TestAccGithubRepositoryBranchesDataSource
? github.com/integrations/terraform-provider-github/v5 [no test files]
=== RUN TestAccGithubRepositoryBranchesDataSource
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_anonymous_account
data_source_github_repository_branches_test.go:46: anonymous account not supported for this operation
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_individual_account
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_organization_account
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_anonymous_account
data_source_github_repository_branches_test.go:125: anonymous account not supported for this operation
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_individual_account
=== RUN TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_organization_account
--- PASS: TestAccGithubRepositoryBranchesDataSource (55.48s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository (15.47s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_anonymous_account (0.00s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_individual_account (7.76s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository/with_an_organization_account (7.71s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering (40.01s)
--- SKIP: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_anonymous_account (0.00s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_individual_account (19.50s)
--- PASS: TestAccGithubRepositoryBranchesDataSource/manages_branches_of_a_new_repository_with_filtering/with_an_organization_account (20.51s)
PASS
ok github.com/integrations/terraform-provider-github/v5/github 56.002s
There was a problem hiding this comment.
Weird...I'm getting errors when I run both (organization and individual) at the same time, but both tests are passing individually.
kfcampbell
left a comment
There was a problem hiding this comment.
Thanks for following up!
…itory_branches (integrations#1296) * Allow to get only protected on non protected branch with github_repository_branches Remove leftover code and doc after integrations#1117 Reintroduce the feature from integrations#1162 with integration tests * Add ConflicsWith * Implement pagination Co-authored-by: Keegan Campbell <me@kfcampbell.com>
…itory_branches (integrations#1296) * Allow to get only protected on non protected branch with github_repository_branches Remove leftover code and doc after integrations#1117 Reintroduce the feature from integrations#1162 with integration tests * Add ConflicsWith * Implement pagination Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Remove leftover dead code and doc after #1117
Reintroduce the feature from #1162 with integration tests