Skip to content

Commit

Permalink
Fix C# Webserver example
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehoban committed Nov 21, 2019
1 parent 30df65a commit 09c0471
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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
4 changes: 3 additions & 1 deletion misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ func TestAccAzureCsWebserver(t *testing.T) {
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "azure-cs-webserver"),
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPHelloWorld(t, stack.Outputs["ipAddress"], nil)
assertHTTPResult(t, stack.Outputs["ipAddress"].(string), nil, func(body string) bool {
return assert.Contains(t, body, "Hello, World")
})
},
})

Expand Down

0 comments on commit 09c0471

Please sign in to comment.