Files
pulumi-docker-build/examples/dotnet_test.go
Pulumi Bot e5da099be4 Upgrade to golangci-lint v2 (#775)
Upgrades golangci-lint from v1 to v2. Automated by Linear issue IT-144.

Co-authored-by: CI <ci@pulumi.com>
2026-02-25 12:40:02 -08:00

41 lines
760 B
Go

//go:build dotnet || all
// +build dotnet all
package examples
import (
"os"
"os/exec"
"path"
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
)
func TestDotNetExample(t *testing.T) {
cwd, err := os.Getwd()
require.NoError(t, err)
nuget := filepath.Join(cwd, "../nuget")
t.Setenv("PULUMI_LOCAL_NUGET", nuget)
cmd := exec.Command("dotnet", "nuget", "add", "source", nuget)
_ = cmd.Run()
test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "dotnet"),
Dependencies: []string{
"Pulumi.DockerBuild",
},
Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),
},
NoParallel: true,
}
integration.ProgramTest(t, &test)
}