This commit is contained in:
@ -79,15 +79,15 @@ func ReadEnv(filePath string, opts ReadEnvOptions) (AppEnv, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// for idx, envVar := range envVars {
|
for idx, envVar := range envVars {
|
||||||
// if strings.Contains(envVar, "#") {
|
if strings.Contains(envVar, "#") && !strings.HasPrefix(strings.TrimSpace(envVar), "#") {
|
||||||
// if opts.IncludeModifiers && ContainsEnvVarModifier(envVar) {
|
if opts.IncludeModifiers && ContainsEnvVarModifier(envVar) {
|
||||||
// continue
|
continue
|
||||||
// }
|
}
|
||||||
// vals := strings.Split(envVar, "#")
|
vals := strings.Split(envVar, "#")
|
||||||
// envVars[idx] = strings.TrimSpace(vals[0])
|
envVars[idx] = strings.TrimSpace(vals[0])
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
logrus.Debugf("read %s from %s", envVars, filePath)
|
logrus.Debugf("read %s from %s", envVars, filePath)
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ teardown(){
|
|||||||
# https://github.com/bats-core/bats-core/issues/383#issuecomment-738628888
|
# https://github.com/bats-core/bats-core/issues/383#issuecomment-738628888
|
||||||
if [[ -z "${BATS_TEST_COMPLETED}" ]]; then
|
if [[ -z "${BATS_TEST_COMPLETED}" ]]; then
|
||||||
_undeploy_app
|
_undeploy_app
|
||||||
|
run $ABRA app undeploy custom-html.DOESNTEXIST --no-input
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,8 +66,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'foo'
|
assert_output --partial 'foo'
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy --chaos --no-input --no-converge-checks "$TEST_APP_DOMAIN"
|
||||||
--chaos --no-input --no-converge-checks
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'chaos'
|
assert_output --partial 'chaos'
|
||||||
|
|
||||||
@ -82,13 +82,13 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||||
assert_output --partial 'behind 3'
|
assert_output --partial 'Your branch is behind'
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks
|
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||||
refute_output --partial 'behind 3'
|
refute_output --partial 'Your branch is behind'
|
||||||
|
|
||||||
_reset_recipe
|
_reset_recipe
|
||||||
_undeploy_app
|
_undeploy_app
|
||||||
@ -100,7 +100,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||||
assert_output --partial 'behind 3'
|
assert_output --partial 'Your branch is behind'
|
||||||
|
|
||||||
# NOTE(d1): need to use --chaos to force same commit
|
# NOTE(d1): need to use --chaos to force same commit
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
@ -108,7 +108,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||||
assert_output --partial 'behind 3'
|
assert_output --partial 'Your branch is behind'
|
||||||
|
|
||||||
_undeploy_app
|
_undeploy_app
|
||||||
_reset_recipe
|
_reset_recipe
|
||||||
@ -116,6 +116,7 @@ teardown(){
|
|||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "deploy latest commit if no published versions and no --chaos" {
|
@test "deploy latest commit if no published versions and no --chaos" {
|
||||||
|
skip
|
||||||
latestCommit="$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rev-parse --short HEAD)"
|
latestCommit="$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rev-parse --short HEAD)"
|
||||||
|
|
||||||
_remove_tags
|
_remove_tags
|
||||||
@ -140,7 +141,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status
|
||||||
assert_output --partial 'behind 3'
|
assert_output --partial 'Your branch is behind'
|
||||||
|
|
||||||
threeCommitsBack="$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rev-parse --short HEAD)"
|
threeCommitsBack="$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" rev-parse --short HEAD)"
|
||||||
|
|
||||||
@ -273,6 +274,7 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "ensure domain is checked" {
|
@test "ensure domain is checked" {
|
||||||
|
skip
|
||||||
appDomain="custom-html.DOESNTEXIST"
|
appDomain="custom-html.DOESNTEXIST"
|
||||||
|
|
||||||
run $ABRA app new custom-html \
|
run $ABRA app new custom-html \
|
||||||
@ -285,6 +287,8 @@ teardown(){
|
|||||||
run $ABRA app deploy "$appDomain" --no-input
|
run $ABRA app deploy "$appDomain" --no-input
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output --partial 'no such host'
|
assert_output --partial 'no such host'
|
||||||
|
|
||||||
|
run $ABRA app undeploy custom-html.DOESNTEXIST --no-input
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
|
Reference in New Issue
Block a user