test: spec out check tests [ci skip]

This commit is contained in:
decentral1se 2021-12-31 17:18:50 +01:00
parent eb3509ab3f
commit 1b7836009f
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
6 changed files with 39 additions and 0 deletions

15
cli/app/check_test.go Normal file
View 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
}

View 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")
}
}

View File

@ -0,0 +1,3 @@
TYPE=testrecipe
DOMAIN=foo.com
MANDATORY_ENV_VAR=bar

View File

@ -0,0 +1,4 @@
TYPE=testrecipe2
DOMAIN=foo.com
MANDATORY_ENV_VAR=bar
# missing MANDATORY_ENV_VAR2

View File

@ -0,0 +1,2 @@
TYPE=testrecipe
MANDATORY_ENV_VAR=bar

View File

@ -0,0 +1,3 @@
TYPE=testrecipe2
MANDATORY_ENV_VAR1=bar
MANDATORY_ENV_VAR2=bar