Upgrade go-provider (#53)

This upgrades pulumi-go-provider to latest. Code was automatically
migrated using a slightly modified patch described
[here](https://github.com/pulumi/pulumi-go-provider/pull/227#issuecomment-2073962385).

---------

Co-authored-by: Ian Wahbe <ian@wahbe.com>
This commit is contained in:
Bryce Lampe
2024-05-13 12:23:24 -07:00
committed by GitHub
parent 9b789f3742
commit ff71c251e1
20 changed files with 208 additions and 704 deletions

View File

@@ -59,7 +59,10 @@ func TestAnnotate(t *testing.T) {
func TestSchema(t *testing.T) {
t.Parallel()
Schema(context.Background(), "v4")
s := newServer(nil)
_, err := s.GetSchema(provider.GetSchemaRequest{Version: 0})
assert.NoError(t, err)
}
type annotator struct{}
@@ -73,10 +76,10 @@ func newServer(client Client) integration.Server {
// Inject a mock client if provided.
if client != nil {
p = mwcontext.Wrap(p, func(ctx provider.Context) provider.Context {
return provider.CtxWithValue(ctx, _mockClientKey, client)
p = mwcontext.Wrap(p, func(ctx context.Context) context.Context {
return context.WithValue(ctx, _mockClientKey, client)
})
}
return integration.NewServer("docker", semver.Version{Major: 4}, p)
return integration.NewServer("docker-build", semver.Version{Major: 0}, p)
}