k3s/test/cmd
Jordan Liggitt e502ca4653 Expect the correct object type to be removed 2019-05-09 10:57:51 -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 Add "fieldManager" to flag to PATCH/CREATE/UPDATE 2019-03-08 16:03:03 -08:00
apps.sh Remove uses of extensions/v1beta1 clients 2018-12-19 11:18:53 -05:00
authorization.sh
batch.sh
certificate.sh
core.sh Merge pull request #73201 from YoubingLi/bugfix 2019-02-20 02:23:21 -08: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
generic-resources.sh Expect the correct object type to be removed 2019-05-09 10:57:51 -07:00
get.sh add cmdline tests for -k 2019-02-25 16:31:03 -08: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 Update test/cmd/legacy-script.sh 2019-03-02 20:41:42 -05: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 Remove uses of extensions/v1beta1 clients 2018-12-19 11:18:53 -05: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
template-output.sh Switch kubectl rollout to directly rolling back deployments 2018-10-26 23:48:44 -04:00
version.sh
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.