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

Error when running tests locally wait: -n: invalid option #19

Open
JimBugwadia opened this issue Apr 21, 2024 · 1 comment
Open

Error when running tests locally wait: -n: invalid option #19

JimBugwadia opened this issue Apr 21, 2024 · 1 comment
Assignees

Comments

@JimBugwadia
Copy link
Member

I am seeing this error when running the test script locally:

./start.sh tests/kyverno-pss.js 1 1
Running tests/kyverno-pss.js...
installing PSS policies
"kyverno" already exists with the same configuration, skipping
NAME: kyverno-policies
LAST DEPLOYED: Sat Apr 20 17:59:03 2024
NAMESPACE: kyverno-policies
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing kyverno-policies 3.1.4 😀

We have installed the "restricted" profile of Pod Security Standards and set them in Enforce mode.

Visit https://kyverno.io/policies/ to find more sample policies.
clusterpolicy.kyverno.io/disallow-capabilities condition met
clusterpolicy.kyverno.io/disallow-capabilities-strict condition met
clusterpolicy.kyverno.io/disallow-host-namespaces condition met
clusterpolicy.kyverno.io/disallow-host-path condition met
clusterpolicy.kyverno.io/disallow-host-ports condition met
clusterpolicy.kyverno.io/disallow-host-process condition met
clusterpolicy.kyverno.io/disallow-privilege-escalation condition met
clusterpolicy.kyverno.io/disallow-privileged-containers condition met
clusterpolicy.kyverno.io/disallow-proc-mount condition met
clusterpolicy.kyverno.io/disallow-selinux condition met
clusterpolicy.kyverno.io/require-run-as-non-root-user condition met
clusterpolicy.kyverno.io/require-run-as-nonroot condition met
clusterpolicy.kyverno.io/restrict-apparmor-profiles condition met
clusterpolicy.kyverno.io/restrict-seccomp condition met
clusterpolicy.kyverno.io/restrict-seccomp-strict condition met
clusterpolicy.kyverno.io/restrict-sysctls condition met
clusterpolicy.kyverno.io/restrict-volume-types condition met
Deploying namespace...
namespace/load-tests created
Deploying RBAC...
serviceaccount/load-test created
clusterrolebinding.rbac.authorization.k8s.io/load-test created
secret/load-test-token created
Creating configmap...
configmap/load-test created
Deploying k6 job...
job.batch/load-test created
Waiting for the job to finish...
./start.sh: line 56: wait: -n: invalid option
wait: usage: wait [n]
@vishal-chdhry
Copy link
Member

vishal-chdhry commented Apr 21, 2024

It works with bash 5.2 (only one homebrew has), It fails for bash 3. I haven't tested with bash 4.
We should add this to the script.

if [ "${BASH_VERSINFO:-0}" -lt 4 ]; then
 echo "start.sh needs bash version >=4"
 exit 1
fi

We can decide if it should be 4 or 5 based on which is the minimum version that works with the script.

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

No branches or pull requests

3 participants