Skip to content
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

Run acceptance and unit tests when test fixtures change #10483

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

trodge
Copy link
Contributor

@trodge trodge commented Apr 18, 2024

fixes hashicorp/terraform-provider-google#17906

Release Note Template for Downstream PRs (will be copied)


@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.

@trodge trodge requested a review from melinath April 19, 2024 19:58
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.

makes sense - one refactor to be able to test better

.ci/magician/cmd/test_terraform_vcr.go Show resolved Hide resolved
@@ -292,7 +292,7 @@ func modifiedPackages(newBranch, oldBranch string, rnr ExecRunner) (map[string]s
}
var goFiles []string
for _, line := range strings.Split(diffs, "\n") {
if strings.HasSuffix(line, ".go") || line == "go.mod" || line == "go.sum" {
if strings.HasSuffix(line, ".go") || strings.Contains(line, "test-fixtures") || line == "go.mod" || line == "go.sum" {
Copy link
Member

Choose a reason for hiding this comment

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

I see that the bash version of this is matching against go.mod$ - why is that? Should we use HasSuffix here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there's any particular reason other than that the other pattern ends in $. We don't have any other files that end with go.mod or go.sum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, never mind. I forgot the line contains the full path of the file.

@trodge trodge requested a review from melinath April 19, 2024 21:13
@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.

1 similar comment
@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.

@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.

@trodge trodge merged commit adafdf1 into GoogleCloudPlatform:main Apr 19, 2024
11 checks passed
@trodge trodge deleted the test-test-fixtures branch April 19, 2024 22:12
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request May 8, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
pcostell pushed a commit to pcostell/magic-modules that referenced this pull request Jul 16, 2024
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.

Run downstream tests (unit & acceptance) if test fixtures are modified
3 participants