Running hack/make-rules/test-e2e-node.sh or test/e2e_node/conformance/run_test.sh
with a password-less sudo user on a dev box right now requires to first
create a password for that user, and then type it every time one wants
to run these tests. This patch is fixing this by not asking for sudo
credentials if it seems the user can run any command without a
password.
Signed-off-by: Jean Rouge <rougej+github@gmail.com>
StorageObjectInUseProtection plugin of admission controller adds
the flag `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection`
to newly created PVCs or PV. In case a user deletes a PVC or PV the PVC
or PV is not removed until the finalizer is removed from the PVC or PV
by PVC or PV Protection Controller.
We are testing this plugin on the e2e tests of "PV Protection" because
most setup scripts enable that like:
* cluster/centos/config-default.sh: Enabled
* cluster/gce/config-default.sh: Enabled
* cluster/gce/config-test.sh: Enabled
* cluster/kubemark/gce/config-default.sh: Enabled
* hack/local-up-cluster.sh: Enabled
* cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py: Disabled
As we are testing it normally, it is nice to enable the plugin by
default.
In 99cdc069e2, we added a check for
whether the directory the user was attempting to test existed or not.
However, adding this check prevented us from running `make test
WHAT=./path/to/pkg/...`, because we believed that `./path/to/pkg/...`
wasn't a valid path to a directory.
Fix this by stripping `/...` before checking whether the directory
exists.
Stop special casing KUBE_TEST_ARGS and limiting the API
group/version settings to "v1" when running the tests. This was
helpful in the past when we used to test multiple values for
KUBE_TEST_API_VERSIONS - if you were specifying KUBE_TEST_ARGS to run a
single test case, you probably didn't want to have it tested for
multiple values of KUBE_TEST_API_VERSIONS.
Now, however, KUBE_TEST_API_VERSIONS comes from
KUBE_AVAILABLE_GROUP_VERSIONS by default, which is a single list instead
of multiple, so we shouldn't need to special case KUBE_TEST_ARGS any
more. This is especially necessary because certain tests that are using
testapi break if KUBE_TEST_API_VERSIONS is just "v1".
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>