k3s/test/cmd
Kubernetes Prow Robot 38afd9815e
Merge pull request #78445 from soltysh/remove_job_scale
Remove kubectl scale job
2019-05-30 02:24:33 -07:00
..
BUILD delete copied comment 2018-07-06 16:26:56 -07:00
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
README.md Feedback from review 2019-02-21 06:15:13 -05:00
apply.sh Fix wrong pipe in grep -q 2019-04-26 14:23:53 +08:00
apps.sh Merge pull request #77423 from apelisse/rollout-restart-other-workloads 2019-05-16 16:27:06 -07:00
authorization.sh Make test/cmd/a*.sh pass shellcheck 2019-04-26 11:39:11 +08:00
batch.sh
certificate.sh
core.sh Remove kubectl scale job 2019-05-28 15:24:38 +02:00
crd.sh Automatically install CRDs during controller init 2018-08-31 12:25:59 -07:00
create.sh add cmdline tests for -k 2019-02-25 16:31:03 -08:00
delete.sh make test/cmd/delete.sh pass shellcheck 2019-02-21 00:45:37 -08:00
diff.sh diff: Make filename cross-platform compatible 2018-12-11 15:36:26 -08:00
discovery.sh Remove build/verify scripts for swagger 1.2 API docs, API server swagger ui / swagger 1.2 config 2019-01-15 13:33:06 -05:00
exec.sh Kubectl exec support resource/name format 2019-04-25 17:44:01 +07:00
generic-resources.sh Wait for integration precondition 2019-05-14 14:11:35 -04:00
get.sh Fix unstructured list interface compatibility, fix kubectl paging 2019-05-08 02:00:18 -04:00
kubeadm.sh pulled kubeadm tests out of runTests to run before tests in test/cmd 2019-03-01 12:17:25 -05:00
kubeconfig.sh
legacy-script.sh Kubectl exec support resource/name format 2019-04-25 17:44:01 +07:00
node-management.sh update e2e shell script due to newly introduced unreachable:NoSchedule taint when the node is in Unknown status 2018-08-27 16:19:03 -07:00
old-print.sh Automatically install CRDs during controller init 2018-08-31 12:25:59 -07:00
plugins.sh add updated plugin mechanism 2018-08-15 15:06:29 -04:00
proxy.sh
rbac.sh Fixes #75706 - Show warning message when namespace is specified for deleting a cluster-scoped resource 2019-04-02 00:49:40 -04:00
request-timeout.sh
run.sh Fix test-cmd kubectl_run flake 2019-02-25 13:51:48 -08:00
save-config.sh
storage.sh Fixes #75706 - Show warning message when namespace is specified for deleting a cluster-scoped resource 2019-04-02 00:49:40 -04:00
template-output.sh Switch kubectl rollout to directly rolling back deployments 2018-10-26 23:48:44 -04:00
version.sh test-cmd: Fixes erroneous integration test that usually passes accidentally 2019-04-02 20:21:14 -07:00
wait.sh Add support for waiting by label selector or on all resources 2019-02-02 16:26:00 +01:00

README.md

Kubernetes Command-Line Integration Test Suite

This document describes how you can use the Kubernetes command-line integration test-suite.

Running Tests

All Tests

To run this entire suite, execute make test-cmd from the top level. This will import each file containing tests functions

Specific Tests

To run a subset of tests (e.g. run_deployment_test and run_impersonation_test), execute make test-cmd WHAT="deployment impersonation". Running specific tests will not try and validate any required resources are available on the server.

Adding Tests

Test functions need to have the format run_*_test so they can executed individually. Once a test has been added, insert a section in legacy-script.sh like

######################
# Replica Sets       #
######################

if kube::test::if_supports_resource "${replicasets}" ; then
    record_command run_rs_tests
fi

Be sure to validate any supported resouces required for the test by using the kube::test::if_supports_resource function.

New File

If the test resides in a new file, source the file in the top of the legacy-script.sh file by adding a new line in

source "${KUBE_ROOT}/test/cmd/apply.sh"
source "${KUBE_ROOT}/test/cmd/apps.sh"
source "${KUBE_ROOT}/test/cmd/authorization.sh"
source "${KUBE_ROOT}/test/cmd/batch.sh"
...

Please keep the order of the source list alphabetical.