kubeshop / testkube

☸️ Kubernetes-native testing framework for test execution and orchestration
https://testkube.io
Other
1.33k stars 130 forks source link

script installation issues #5642

Open Mahmoud-Eltohamy opened 3 months ago

Mahmoud-Eltohamy commented 3 months ago

Describtion

  1. the bug happens during installation using curl -sSLf https://get.testkube.io | sh
  2. in case there is failure during installation the script cannot be ran again due to the following error ln: failed to create symbolic link '/usr/local/bin/testkube': No such file or directory ln: failed to create symbolic link '/usr/local/bin/tk': No such file or directory kubectl-testkube installed in:
    • /usr/local/bin/kubectl-testkube
    • /usr/local/bin/testkube
    • /usr/local/bin/tk To Reproduce Steps to reproduce the behavior:
  3. Run curl -sSLf https://get.testkube.io | sh
  4. Re-run the script again
  5. See error

Expected behavior the install script should be idempotent and be able to run on the same machine multiple times

Version / Cluster

Screenshots image

vsukhin commented 3 months ago

thank you @Mahmoud-Eltohamy let us check it out @ypoplavs

Mahmoud-Eltohamy commented 3 months ago

the fix will be by forcing the symlink creation to change the script ln -s /usr/local/bin/kubectl-testkube /usr/local/bin/testkube ln -s /usr/local/bin/kubectl-testkube /usr/local/bin/tk to ln -sf /usr/local/bin/kubectl-testkube /usr/local/bin/testkube ln -sf /usr/local/bin/kubectl-testkube /usr/local/bin/tk

in this script https://raw.githubusercontent.com/kubeshop/testkube/main/install.sh i would be happy to raise a pr for it, and maybe introduce some enhancements to the install script also

ypoplavs commented 2 months ago

Hello @Mahmoud-Eltohamy! Thanks or raising this. You are welcome to submit a PR including other enhancements!