Skip to content

Commit

Permalink
Merge pull request pulumi#475 from pulumi/lukehoban/dotnettest
Browse files Browse the repository at this point in the history
Add tests for C# and F#
  • Loading branch information
lukehoban committed Nov 21, 2019
2 parents 1c45199 + 09c0471 commit 6cc9be1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure-cs-webserver/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static Task<int> Main(string[] args)
{
Name = "webserveripcfg",
SubnetId = network.Subnets.Apply(subnets => subnets[0].Id),
PrivateIpAddressAllocation = "dynamic",
PrivateIpAddressAllocation = "Dynamic",
PublicIpAddressId = publicIp.Id,
},
}
Expand All @@ -66,7 +66,7 @@ static Task<int> Main(string[] args)
AdminUsername = "testadmin",
AdminPassword = "Password1234!",
CustomData =
@"#!/bin/bash\n
@"#!/bin/bash
echo ""Hello, World!"" > index.html
nohup python -m SimpleHTTPServer 80 &",
},
Expand Down
48 changes: 48 additions & 0 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,54 @@ func TestAccAwsTsTwitterAthena(t *testing.T) {
integration.ProgramTest(t, &test)
}

func TestAccAzureCsAppService(t *testing.T) {
test := getAzureBase(t).
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "azure-cs-appservice"),
Config: map[string]string{
"sqlPassword": "2@Password@2",
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, stack.Outputs["endpoint"], nil, func(body string) bool {
return assert.Contains(t, body, "Greetings from Azure App Service!")
})
},
})

integration.ProgramTest(t, &test)
}

func TestAccAzureCsWebserver(t *testing.T) {
test := getAzureBase(t).
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "azure-cs-webserver"),
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, stack.Outputs["ipAddress"].(string), nil, func(body string) bool {
return assert.Contains(t, body, "Hello, World")
})
},
})

integration.ProgramTest(t, &test)
}

func TestAccAzureFsAppService(t *testing.T) {
test := getAzureBase(t).
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "azure-fs-appservice"),
Config: map[string]string{
"sqlPassword": "2@Password@2",
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, stack.Outputs["endpoint"], nil, func(body string) bool {
return assert.Contains(t, body, "Greetings from Azure App Service!")
})
},
})

integration.ProgramTest(t, &test)
}

func TestAccAzureJsWebserver(t *testing.T) {
test := getAzureBase(t).
With(integration.ProgramTestOptions{
Expand Down

0 comments on commit 6cc9be1

Please sign in to comment.