-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathexamples_dotnet_test.go
50 lines (41 loc) · 1.22 KB
/
examples_dotnet_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
//go:build dotnet || all
// +build dotnet all
package examples
import (
"path/filepath"
"testing"
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
"github.com/stretchr/testify/assert"
)
func TestAccWebserverCs(t *testing.T) {
test := getCSBaseOptions(t).
With(integration.ProgramTestOptions{
RunUpdateTest: false, //this is newly moved to a new namespace
Dir: filepath.Join(getCwd(t), "webserver-cs"),
})
integration.ProgramTest(t, &test)
}
func TestAccFifoSqsQueueCs(t *testing.T) {
test := getCSBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "sqs-fifo-queue", "csharp"),
RunUpdateTest: false,
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assert.Contains(t, stack.Outputs["QueueName"].(string), ".fifo")
},
})
integration.ProgramTest(t, &test)
}
func getCSBaseOptions(t *testing.T) integration.ProgramTestOptions {
envRegion := getEnvRegion(t)
csharpBase := integration.ProgramTestOptions{
Config: map[string]string{
"aws:region": envRegion,
},
Dependencies: []string{
"Pulumi.Aws",
},
}
return csharpBase
}