mirror of https://github.com/pulumi/pulumi.git
52 lines
1.4 KiB
Go
52 lines
1.4 KiB
Go
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
//go:build !smoke
|
|
|
|
package examples
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
|
|
)
|
|
|
|
//nolint:paralleltest // uses parallel programtest
|
|
func TestAccMinimal_withLocalState(t *testing.T) {
|
|
test := getBaseOptions().
|
|
With(integration.ProgramTestOptions{
|
|
Dir: filepath.Join(getCwd(t), "minimal"),
|
|
Config: map[string]string{
|
|
"name": "Pulumi",
|
|
},
|
|
Secrets: map[string]string{
|
|
"secret": "this is my secret message",
|
|
},
|
|
ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) {
|
|
// Simple runtime validation that just ensures the checkpoint was written and read.
|
|
assert.NotNil(t, stackInfo.Deployment)
|
|
},
|
|
RunBuild: true,
|
|
CloudURL: integration.MakeTempBackend(t),
|
|
})
|
|
|
|
integration.ProgramTest(t, &test)
|
|
}
|
|
|
|
//nolint:paralleltest // uses parallel programtest
|
|
func TestAccDynamicProviderSimple_withLocalState(t *testing.T) {
|
|
test := getBaseOptions().
|
|
With(integration.ProgramTestOptions{
|
|
Dir: filepath.Join(getCwd(t), "dynamic-provider/simple"),
|
|
Config: map[string]string{
|
|
"simple:config:w": "1",
|
|
"simple:config:x": "1",
|
|
"simple:config:y": "1",
|
|
},
|
|
CloudURL: integration.MakeTempBackend(t),
|
|
})
|
|
|
|
integration.ProgramTest(t, &test)
|
|
}
|