11package test
22
33import (
4- "testing"
54 "fmt"
6- "time"
5+ "github.com/gruntwork-io/terratest/modules/aws"
6+ "github.com/gruntwork-io/terratest/modules/logger"
7+ "github.com/gruntwork-io/terratest/modules/packer"
8+ "io/ioutil"
79 "net/http"
810 "net/url"
9- "io/ioutil"
1011 "strings"
11- "github.com/gruntwork-io/terratest/modules/logger"
12- "github.com/gruntwork-io/terratest/modules/packer"
13- "github.com/gruntwork-io/terratest/modules/aws"
12+ "testing"
13+ "time"
1414)
1515
1616// The username and password we use in all the examples, mocks, and tests
@@ -49,18 +49,17 @@ func buildCouchbaseWithPackerE(t *testing.T, builderName string, baseAmiName str
4949
5050 options := & packer.Options {
5151 Template : templatePath ,
52- Only : builderName ,
52+ Only : builderName ,
5353 Vars : map [string ]string {
54- "aws_region" : awsRegion ,
54+ "aws_region" : awsRegion ,
5555 "base_ami_name" : baseAmiName ,
56- "edition" : edition ,
56+ "edition" : edition ,
5757 },
5858 }
5959
6060 return packer .BuildAmiE (t , options )
6161}
6262
63-
6463func HttpPostForm (t * testing.T , postUrl string , postParams url.Values ) (int , string , error ) {
6564 logger .Logf (t , "Making an HTTP POST call to URL %s with body %v" , postUrl , postParams )
6665
@@ -82,4 +81,4 @@ func HttpPostForm(t *testing.T, postUrl string, postParams url.Values) (int, str
8281 }
8382
8483 return resp .StatusCode , strings .TrimSpace (string (respBody )), nil
85- }
84+ }
0 commit comments