Created
March 12, 2020 08:12
-
-
Save developer-guy/573b85404478535bb3d10f7f8671e84b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
http_helper "github.com/gruntwork-io/terratest/modules/http-helper" | |
"github.com/gruntwork-io/terratest/modules/terraform" | |
"testing" | |
"time" | |
) | |
func TestWebServer(t *testing.T) { | |
tfOptions := &terraform.Options{ | |
TerraformDir: "./web-server", | |
} | |
defer terraform.Destroy(t, tfOptions) | |
terraform.InitAndApply(t, tfOptions) | |
tfOutput := terraform.Output(t, tfOptions, "url") | |
http_helper.HttpGetWithRetry(t, tfOutput, nil, 200, "Hello, World", 15, 1*time.Second) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment