* Rename the provider to dockerbuild. * Add Makefile targets required by CI. * Add per-language test targets compatible with CI. * Fix broken example yaml. * Add gitignore exclusions to fix SDK generation in CI. * Fix lint errors. * Vendor pulumi CLI via `tools.go` instead of `.pulumi`. * Consolidate `go.mod`s into one file, with a minimal `go.mod` for the Go SDK. * Add codecov.
31 lines
593 B
Go
31 lines
593 B
Go
//go:build go || all
|
|
// +build go all
|
|
|
|
package examples
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGoExample(t *testing.T) {
|
|
cwd, err := os.Getwd()
|
|
require.NoError(t, err)
|
|
|
|
test := integration.ProgramTestOptions{
|
|
Dir: path.Join(cwd, "go"),
|
|
Dependencies: []string{
|
|
"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild=../sdk/go/dockerbuild",
|
|
},
|
|
Secrets: map[string]string{
|
|
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),
|
|
},
|
|
}
|
|
|
|
integration.ProgramTest(t, &test)
|
|
}
|