forked from coop-cloud/abra
test: spec out check tests [ci skip]
This commit is contained in:
parent
eb3509ab3f
commit
1b7836009f
15
cli/app/check_test.go
Normal file
15
cli/app/check_test.go
Normal file
@ -0,0 +1,15 @@
|
||||
package app
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCheck(t *testing.T) {
|
||||
// copy testrecipe into ~/.abra/apps/...
|
||||
// copy testapp into ~/.abra/servers/testserver
|
||||
// run app check test recipe and it should pass
|
||||
}
|
||||
|
||||
func TestCheckBadEnv(t *testing.T) {
|
||||
// copy testrecipe, testrecipe2 into ~/.abra/apps/...
|
||||
// copy testapp, test2 into ~/.abra/servers/testserver
|
||||
// run app check test recipe and it should fail
|
||||
}
|
12
pkg/integration/integration.go
Normal file
12
pkg/integration/integration.go
Normal file
@ -0,0 +1,12 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func skipIfNotIntegration(t *testing.T) {
|
||||
if os.Getenv("ABRA_INTEGRATION") == "" {
|
||||
t.Skip("missing 'ABRA_INTEGRATION', not running integration tests")
|
||||
}
|
||||
}
|
3
tests/integration/app-check/testapp/testapp.env
Normal file
3
tests/integration/app-check/testapp/testapp.env
Normal file
@ -0,0 +1,3 @@
|
||||
TYPE=testrecipe
|
||||
DOMAIN=foo.com
|
||||
MANDATORY_ENV_VAR=bar
|
4
tests/integration/app-check/testapp2/testapp2.env
Normal file
4
tests/integration/app-check/testapp2/testapp2.env
Normal file
@ -0,0 +1,4 @@
|
||||
TYPE=testrecipe2
|
||||
DOMAIN=foo.com
|
||||
MANDATORY_ENV_VAR=bar
|
||||
# missing MANDATORY_ENV_VAR2
|
2
tests/integration/app-check/testrecipe/.env.sample
Normal file
2
tests/integration/app-check/testrecipe/.env.sample
Normal file
@ -0,0 +1,2 @@
|
||||
TYPE=testrecipe
|
||||
MANDATORY_ENV_VAR=bar
|
3
tests/integration/app-check/testrecipe2/.env.sample
Normal file
3
tests/integration/app-check/testrecipe2/.env.sample
Normal file
@ -0,0 +1,3 @@
|
||||
TYPE=testrecipe2
|
||||
MANDATORY_ENV_VAR1=bar
|
||||
MANDATORY_ENV_VAR2=bar
|
Loading…
Reference in New Issue
Block a user