Skip to content

Allow anonymous acceptance tests without credentials - #3602

Merged
deiga merged 2 commits into
integrations:mainfrom
rilical:rilical-terraform-tester-discovery
Aug 17, 2026
Merged

Allow anonymous acceptance tests without credentials#3602
deiga merged 2 commits into
integrations:mainfrom
rilical:rilical-terraform-tester-discovery

Conversation

@rilical

@rilical rilical commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

I found that getTestMeta still attempted token or GitHub App credential setup when GH_TEST_AUTH_MODE=anonymous, so credential-free anonymous acceptance tests exited during setup. This change skips credential setup only for anonymous mode, and the authenticated paths are unchanged.

I added Test_getTestMeta_anonymousDoesNotRequireCredentials to cover the regression. I ran make test, go vet ./..., and CGO_ENABLED=0 go build ./...; gofmt -l . returned no files.

@github-actions

Copy link
Copy Markdown

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

@stevehipwell

Copy link
Copy Markdown
Collaborator

@rilical I'm not sure I agree with the design here or even the problem description, at first glance this change looks to add significant complexity which goes against to Go idiom of making code as readable as possible. The acceptance test design is to gate the tests, the helpers are expected to fail if they're used by a test that doesn't have permission as this is a coding error.

FYI for a large change such as this it'd be best to open an issue to track the actual problem being solved rather than come with an implementation.

@stevehipwell stevehipwell added the Status: Blocked Some technical or requirement is blocking the issue label Aug 12, 2026
@rilical rilical changed the title Harden acceptance-test mode guards Allow anonymous acceptance tests without credentials Aug 12, 2026
@rilical
rilical force-pushed the rilical-terraform-tester-discovery branch from 262012c to 6d6ff28 Compare August 12, 2026 16:35
@rilical

rilical commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@stevehipwell Would you mind giving this another look?

@robert-crandall robert-crandall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for simplifying this. This PR fixes a real problem of anonymous tests failing during setup.

@deiga
deiga requested a balanced review from Copilot August 12, 2026 23:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

These provider review instructions are being used. No blocking findings found.

Adds credential-free anonymous acceptance-test setup.

Changes:

  • Skips credential configuration in anonymous mode.
  • Adds regression coverage for anonymous metadata initialization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
github/acc_test.go Bypasses credentials for anonymous tests.
github/provider_test.go Adds anonymous-mode regression test.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@deiga
deiga requested a review from stevehipwell August 12, 2026 23:21
@stevehipwell stevehipwell added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label Aug 14, 2026

@stevehipwell stevehipwell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code change looks good to me, but we don't need the test.

Comment thread github/provider_test.go Outdated
@stevehipwell stevehipwell removed the Status: Blocked Some technical or requirement is blocking the issue label Aug 14, 2026

@stevehipwell stevehipwell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevehipwell

Copy link
Copy Markdown
Collaborator

@rilical if you can rebase your branch we can get this merged in.

rilical and others added 2 commits August 17, 2026 13:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Steve Hipwell <steve.hipwell@gmail.com>
@rilical
rilical force-pushed the rilical-terraform-tester-discovery branch from 524883b to 7043077 Compare August 17, 2026 17:10
@deiga
deiga enabled auto-merge (squash) August 17, 2026 21:06
@deiga
deiga merged commit 67f3fd1 into integrations:main Aug 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants