-
Notifications
You must be signed in to change notification settings - Fork 737
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
Allow to get only protected on non protected branch with github_repository_branches #1296
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 :( |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird...I'm getting errors when I run both (organization and individual) at the same time, but both tests are passing individually.
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.
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