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

Test shim as a normal unit test #4917

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Test shim as a normal unit test #4917

merged 2 commits into from
Dec 12, 2024

Conversation

blampe
Copy link
Contributor

@blampe blampe commented Dec 12, 2024

This removes the go_test_shim job defined in extraTests by making it a normal provider unit test instead of something that needs to be run as part of upstream.

We currently attempt to upload coverage as part of this test, but it doesn't work. pulumi/ci-mgmt#1224 will start uploading unit test coverage by default.

Copy link
Member

@t0yv0 t0yv0 left a comment

Choose a reason for hiding this comment

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

I'm not 100% sure but I think TestProviderShim given all it does is NewUpstreamProvider is adequately tested by the rest of the suite. There's no danger to coverage here - the only downside is not failing faster on some obvious mistakes. But that's fine.

Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

)

// This checks that any runtime checks in the underlying provider (with patches) are passed.
func TestProviderShim(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Ah here it is. This is good!

@blampe
Copy link
Contributor Author

blampe commented Dec 12, 2024

Upstream failure is unrelated

panic.go:629: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: updating WAF ByteMatchSet (b47b2c2f-e5d8-437a-b3b7-da1027bf3781): operation error WAF: UpdateByteMatchSet, https response error StatusCode: 400, RequestID: abd63009-1807-4e89-8e98-a8bf9a595788, WAFInvalidOperationException: Operation is invalid for this entity.

@blampe blampe merged commit 8b5a96f into master Dec 12, 2024
24 of 25 checks passed
@blampe blampe deleted the blampe/test-shim branch December 12, 2024 23:09
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v6.65.0.

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