Skip to content
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

Merged
merged 11 commits into from
Aug 7, 2023
Merged

First commit #1

merged 11 commits into from
Aug 7, 2023

Conversation

joelee2012
Copy link
Owner

No description provided.

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@6170bde). Click here to learn what that means.
The diff coverage is n/a.

@@           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"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Use 'cd ... || exit' or 'cd ... || return' in case cd fails. SC2164

}

setup() {
. "$SKUST_BIN"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
ShellCheck can't follow non-constant source. Use a directive to specify location. SC1090

}

@test "it should generate secrets from validated vals uri" {
cat >$TEMPDIR/kustomization.yaml <<EOF
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

- privateKey=ref+sops://secrets.yaml#/privateKey
- publicKey=ref+sops://$TEMPDIR/secrets.yaml#/publicKey
EOF
run --separate-stderr "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

}

@test "it should exit with error if file/literal has no defined name" {
cat >$TEMPDIR/kustomization.yaml <<EOF
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

files:
- ref+sops://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

}

@test "it should exit with error if given unsupported scheme" {
cat >$TEMPDIR/kustomization.yaml <<EOF
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

files:
- key=ref+xxxx://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

}

@test "it should exit with error if no fragement set" {
cat >$TEMPDIR/kustomization.yaml <<EOF
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

files:
- key=ref+sops://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

TEMPDIR=$(mktemp -d)
export TEMPDIR
cp "$TEST_DIR"/secrets.yaml "$TEMPDIR"
cd "$TEST_DIR"
Copy link
Owner Author

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 🐶

Suggested change
cd "$TEST_DIR"
cd "$TEST_DIR" || exit

}

@test "it should generate secrets from validated vals uri" {
cat >$TEMPDIR/kustomization.yaml <<EOF
Copy link
Owner Author

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 🐶

Suggested change
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
Copy link
Owner Author

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 🐶

Suggested change
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
Copy link
Owner Author

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 🐶

Suggested change
cat >$TEMPDIR/kustomization.yaml <<EOF
cat >"$TEMPDIR"/kustomization.yaml <<EOF

files:
- ref+sops://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

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 🐶

Suggested change
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
Copy link
Owner Author

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 🐶

Suggested change
cat >$TEMPDIR/kustomization.yaml <<EOF
cat >"$TEMPDIR"/kustomization.yaml <<EOF

files:
- key=ref+xxxx://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

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 🐶

Suggested change
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
Copy link
Owner Author

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 🐶

Suggested change
cat >$TEMPDIR/kustomization.yaml <<EOF
cat >"$TEMPDIR"/kustomization.yaml <<EOF

files:
- key=ref+sops://secrets.yaml
EOF
run "$SKUST_BIN" build $TEMPDIR
Copy link
Owner Author

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 🐶

Suggested change
run "$SKUST_BIN" build $TEMPDIR
run "$SKUST_BIN" build "$TEMPDIR"

@joelee2012 joelee2012 merged commit 1249c08 into main Aug 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant