Skip to content

Commit

Permalink
Add first program test for go split SDK
Browse files Browse the repository at this point in the history
- Manually set up link ready for program test go mod replacement.
  • Loading branch information
danielrbradley committed Sep 12, 2022
1 parent 4ddb85b commit 76de102
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -225,7 +225,9 @@ install_dotnet_sdk::

install_python_sdk::

# Create link so the Gp Split SDK appears where program test will expect it
install_go_sdk::
ln -s $(WORKING_DIR)/sdk/pulumi-azure-native-sdk bin/src/github.com/pulumi/pulumi-azure-native-sdk

install_java_sdk::

Expand Down
12 changes: 12 additions & 0 deletions examples/examples_go_test.go
Expand Up @@ -20,6 +20,18 @@ func TestAccSimpleGo(t *testing.T) {
integration.ProgramTest(t, &test)
}

func TestAccSimpleGoSplit(t *testing.T) {
test := getGoBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "go-simple-split"),
Dependencies: []string{
"github.com/pulumi/pulumi-azure-native-sdk",
},
})

integration.ProgramTest(t, &test)
}

func TestAccAksGo(t *testing.T) {
t.Skip("Disabled due to https://github.com/pulumi/pulumi-azure-native/issues/304")
test := getGoBaseOptions(t).
Expand Down
3 changes: 3 additions & 0 deletions examples/go-simple-split/Pulumi.yaml
@@ -0,0 +1,3 @@
name: gosimplesplit
runtime: go
description: A minimal Azure Go Pulumi program
9 changes: 9 additions & 0 deletions examples/go-simple-split/go.mod
@@ -0,0 +1,9 @@
module gosimplesplit

go 1.14

require (
github.com/pulumi/pulumi-azure-native-sdk/resources v1.76.0-alpha.24984ad3
github.com/pulumi/pulumi-azure-native-sdk/storage v1.76.0-alpha.24984ad3
github.com/pulumi/pulumi/sdk/v3 v3.37.2
)

0 comments on commit 76de102

Please sign in to comment.