Skip to content

Conversation

@nicdumz
Copy link
Contributor

@nicdumz nicdumz commented Nov 4, 2025

main makes it sound like this is a test for the main.go entrypoint and
this confuses Bazel automated BUILD file generation code.

Instead, create a test/ subpackage and run the test from there.

Notes:

  • Code claimed to validate third_party/ templates but in practice was
    validating third_party/terraform only: clean up variables and comments
    to make this clearer.
  • Because the test is moved one directory deeper, there is now a need
    for one more Dir() call to bubble one directory higher (relatively)
    to find ./third_party/ compared to the test file.

Tested: with local tests, and I also locally edited a template (into not a template) to verify test still fails as expected.

Release Note Template for Downstream PRs (will be copied)

See
Write release notes
for guidance.

@nicdumz nicdumz marked this pull request as ready for review November 4, 2025 18:08
@github-actions github-actions bot requested a review from slevenick November 4, 2025 18:09
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

@slevenick slevenick requested a review from melinath November 4, 2025 18:30
Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

changing the package name is definitely fine, and the implementation changes are... probably fine? a couple nits/questions

`main` makes it sound like this is a test for the main.go entrypoint and
this confuses Bazel automated BUILD file generation code.

Instead, create a `test/` subpackage and run the test from there.

Notes:

 * Code claimed to validate `third_party/` templates but in practice was
   validating `third_party/terraform` only: clean up variables and comments
   to make this clearer.
 * Because the test is moved one directory deeper, there is now a need
   for one more `Dir()` call to bubble one directory higher (relatively)
   to find `./third_party/` compared to the test file.
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM - I'm not sure we want this to live in a test directory long-term but I don't know what the best spot would be. Putting it next to main.go is definitely wrong, and third_party isn't a go package. So... this seems fine for now. We can always move it later if we want to.

@melinath melinath added this pull request to the merge queue Nov 5, 2025
Merged via the queue into GoogleCloudPlatform:main with commit b3e72f7 Nov 5, 2025
25 checks passed
bcreddy-gcp pushed a commit to bcreddy-gcp/magic-modules that referenced this pull request Nov 24, 2025
deliaqi pushed a commit to deliaqi/magic-modules that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants