samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
117 stars 24 forks source link

tests: use k8s api for executing smbclient commands #94

Closed phlogistonjohn closed 3 years ago

phlogistonjohn commented 3 years ago

Previously, we were shelling out to kubectl exec to run smbclient commands on our smbclient test pod. These changes add a new api based TestExec type to the test/utils/kube package. Then it replaces the kubectl based version with a new version based on TestExec and its types.

This should be more effieicent as well as hopefully fix #93 because the old implementation was (ab)using KUBECONFIG in a way that broke on some setups.

fixes: #93

phlogistonjohn commented 3 years ago

Before we fix the other reason the ci is failing: @raghavendra-talur (and anyone else interested) please take a look at these failing tests as it reveals the new errors that you get based on this new code. It includes more information than before as well as quoting the command in a semi-useful manner.