github.com/mweagle/Sparta@v1.15.0/s3Site_test.go (about)

     1  package sparta
     2  
     3  import (
     4  	"path/filepath"
     5  	"testing"
     6  
     7  	spartaSystem "github.com/mweagle/Sparta/system"
     8  	gocf "github.com/mweagle/go-cloudformation"
     9  )
    10  
    11  func TestS3Site(t *testing.T) {
    12  	// Get the gopath, find this source directory and
    13  	// make a site out of the documentation
    14  	gopath := spartaSystem.GoPath()
    15  	docsPath := filepath.Join(gopath, "src", "github.com", "mweagle", "Sparta", "docs")
    16  	s3Site, s3SiteErr := NewS3Site(docsPath)
    17  	if s3SiteErr != nil {
    18  		t.Fatalf("Failed to create S3 Site: %s", s3SiteErr)
    19  	}
    20  	s3Site.BucketName = gocf.String("sparta-site.spartademo.net")
    21  	apiStage := NewStage("v1")
    22  	apiGateway := NewAPIGateway("SpartaTestSite", apiStage)
    23  
    24  	testProvisionEx(t,
    25  		testLambdaData(),
    26  		apiGateway,
    27  		s3Site,
    28  		nil,
    29  		false,
    30  		nil,
    31  	)
    32  }