github.com/leowmjw/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/app/go/app_acceptance_test.go (about) 1 package goapp 2 3 import ( 4 "path/filepath" 5 "testing" 6 7 "github.com/hashicorp/otto/helper/vagrant" 8 "github.com/hashicorp/otto/otto" 9 ) 10 11 func TestApp_dev(t *testing.T) { 12 otto.Test(t, otto.TestCase{ 13 Core: otto.TestCore(t, &otto.TestCoreOpts{ 14 Path: filepath.Join("./test-fixtures", "basic", "Appfile"), 15 App: new(App), 16 }), 17 18 Steps: []otto.TestStep{ 19 &vagrant.DevTestStepInit{}, 20 21 // Verify we have Go 22 &vagrant.DevTestStepGuestScript{ 23 Command: "go version", 24 }, 25 26 // Verify we can build immediately (we should be in the directory) 27 &vagrant.DevTestStepGuestScript{ 28 Command: "grep '42' <<< $(go build -o test-output && ./test-output 2>&1)", 29 }, 30 }, 31 32 Teardown: vagrant.DevTestTeardown, 33 }) 34 }