diff --git a/cli/app/check_test.go b/cli/app/check_test.go new file mode 100644 index 00000000..cfa0e102 --- /dev/null +++ b/cli/app/check_test.go @@ -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 +} diff --git a/pkg/integration/integration.go b/pkg/integration/integration.go new file mode 100644 index 00000000..bdb0a531 --- /dev/null +++ b/pkg/integration/integration.go @@ -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") + } +} diff --git a/tests/integration/app-check/testapp/testapp.env b/tests/integration/app-check/testapp/testapp.env new file mode 100644 index 00000000..1ec5393c --- /dev/null +++ b/tests/integration/app-check/testapp/testapp.env @@ -0,0 +1,3 @@ +TYPE=testrecipe +DOMAIN=foo.com +MANDATORY_ENV_VAR=bar diff --git a/tests/integration/app-check/testapp2/testapp2.env b/tests/integration/app-check/testapp2/testapp2.env new file mode 100644 index 00000000..446690dc --- /dev/null +++ b/tests/integration/app-check/testapp2/testapp2.env @@ -0,0 +1,4 @@ +TYPE=testrecipe2 +DOMAIN=foo.com +MANDATORY_ENV_VAR=bar +# missing MANDATORY_ENV_VAR2 diff --git a/tests/integration/app-check/testrecipe/.env.sample b/tests/integration/app-check/testrecipe/.env.sample new file mode 100644 index 00000000..1acb87eb --- /dev/null +++ b/tests/integration/app-check/testrecipe/.env.sample @@ -0,0 +1,2 @@ +TYPE=testrecipe +MANDATORY_ENV_VAR=bar diff --git a/tests/integration/app-check/testrecipe2/.env.sample b/tests/integration/app-check/testrecipe2/.env.sample new file mode 100644 index 00000000..09179f21 --- /dev/null +++ b/tests/integration/app-check/testrecipe2/.env.sample @@ -0,0 +1,3 @@ +TYPE=testrecipe2 +MANDATORY_ENV_VAR1=bar +MANDATORY_ENV_VAR2=bar