-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First commit #1
First commit #1
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1 +/- ##
=======================================
Coverage ? 90.62%
=======================================
Files ? 1
Lines ? 64
Branches ? 0
=======================================
Hits ? 58
Misses ? 6
Partials ? 0 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
TEMPDIR=$(mktemp -d) | ||
export TEMPDIR | ||
cp "$TEST_DIR"/secrets.yaml "$TEMPDIR" | ||
cd "$TEST_DIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
setup() { | ||
. "$SKUST_BIN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
@test "it should generate secrets from validated vals uri" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- privateKey=ref+sops://secrets.yaml#/privateKey | ||
- publicKey=ref+sops://$TEMPDIR/secrets.yaml#/publicKey | ||
EOF | ||
run --separate-stderr "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
@test "it should exit with error if file/literal has no defined name" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files: | ||
- ref+sops://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
@test "it should exit with error if given unsupported scheme" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files: | ||
- key=ref+xxxx://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
@test "it should exit with error if no fragement set" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files: | ||
- key=ref+sops://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEMPDIR=$(mktemp -d) | ||
export TEMPDIR | ||
cp "$TEST_DIR"/secrets.yaml "$TEMPDIR" | ||
cd "$TEST_DIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
cd "$TEST_DIR" | |
cd "$TEST_DIR" || exit |
} | ||
|
||
@test "it should generate secrets from validated vals uri" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
cat >$TEMPDIR/kustomization.yaml <<EOF | |
cat >"$TEMPDIR"/kustomization.yaml <<EOF |
- privateKey=ref+sops://secrets.yaml#/privateKey | ||
- publicKey=ref+sops://$TEMPDIR/secrets.yaml#/publicKey | ||
EOF | ||
run --separate-stderr "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
run --separate-stderr "$SKUST_BIN" build $TEMPDIR | |
run --separate-stderr "$SKUST_BIN" build "$TEMPDIR" |
} | ||
|
||
@test "it should exit with error if file/literal has no defined name" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
cat >$TEMPDIR/kustomization.yaml <<EOF | |
cat >"$TEMPDIR"/kustomization.yaml <<EOF |
files: | ||
- ref+sops://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
run "$SKUST_BIN" build $TEMPDIR | |
run "$SKUST_BIN" build "$TEMPDIR" |
} | ||
|
||
@test "it should exit with error if given unsupported scheme" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
cat >$TEMPDIR/kustomization.yaml <<EOF | |
cat >"$TEMPDIR"/kustomization.yaml <<EOF |
files: | ||
- key=ref+xxxx://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
run "$SKUST_BIN" build $TEMPDIR | |
run "$SKUST_BIN" build "$TEMPDIR" |
} | ||
|
||
@test "it should exit with error if no fragement set" { | ||
cat >$TEMPDIR/kustomization.yaml <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
cat >$TEMPDIR/kustomization.yaml <<EOF | |
cat >"$TEMPDIR"/kustomization.yaml <<EOF |
files: | ||
- key=ref+sops://secrets.yaml | ||
EOF | ||
run "$SKUST_BIN" build $TEMPDIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
run "$SKUST_BIN" build $TEMPDIR | |
run "$SKUST_BIN" build "$TEMPDIR" |
No description provided.