fix: skip anonymous tests that can't be done anonymously #1465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is in reference to #1414 but does not actually solve it.
Behavior
Before the change?
After the change?
Other information
While working on #1414 I found these tests which will never work without a feature change and test rework as well.
Additional info
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Type: Breaking change
label)If
Yes
, what's the impact:Pull request type
Please add the corresponding label for change this PR introduces:
Type: Bug
Justification of Changes
TestAccGithubRepositoryFileDataSource
In this test it tries to create a repo and file which can then be queried, which is not possible with no access token as an anonymous test would have.
My original idea was to create a test with a static file, however that failed as there is no
owner
attribute on the data source so the owner would get set to an empty string even withGITHUB_OWNER
orGITHUB_ORGANIZATION
set.TestAccGithubTreeDataSource
In this test it tries to create a repo which can then be queried, which is not possible with no access token as an anonymous test would have.
My original idea was to create a test with a static repo, however that failed as there is no
owner
attribute on the data source so the owner would get set to an empty string even withGITHUB_OWNER
orGITHUB_ORGANIZATION
set.