Fix C# Webserver example
MODIFY
azure-cs-webserver/Program.cs
azure-cs-webserver/Program.cs
@@ -46,7 +46,7 @@ class Program
{
Name = "webserveripcfg",
SubnetId = network.Subnets.Apply(subnets => subnets[0].Id),
- PrivateIpAddressAllocation = "dynamic",
+ PrivateIpAddressAllocation = "Dynamic",
PublicIpAddressId = publicIp.Id,
},
}
@@ -66,7 +66,7 @@ class Program
AdminUsername = "testadmin",
AdminPassword = "Password1234!",
CustomData =
-@"#!/bin/bash\n
+@"#!/bin/bash
echo ""Hello, World!"" > index.html
nohup python -m SimpleHTTPServer 80 &",
},

MODIFY
misc/test/examples_test.go
misc/test/examples_test.go
@@ -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")
+ })
},
})

Fix C# Webserver example