kubernetes-the-hard-way/docs/16-e2e-tests.md

41 lines
970 B
Markdown
Raw Normal View History

2019-03-20 07:34:49 +03:00
# Run End-to-End Tests
Install Go
```
wget https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.12.1.linux-amd64.tar.gz
export GOPATH="/home/vagrant/go"
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
```
## Install kubetest
```
2020-06-18 07:00:32 +03:00
git clone https://github.com/kubernetes/test-infra.git
cd test-infra/
GO111MODULE=on go install ./kubetest
2019-03-20 07:34:49 +03:00
```
> Note: This may take a few minutes depending on your network speed
2020-06-18 07:00:32 +03:00
## Use the version specific to your cluster
2019-03-20 07:34:49 +03:00
```
2020-06-18 07:00:32 +03:00
K8S_VERSION=$(kubectl version -o json | jq -r '.serverVersion.gitVersion')
export KUBERNETES_CONFORMANCE_TEST=y
export KUBECONFIG="$HOME/.kube/config"
2019-03-20 07:34:49 +03:00
2020-06-18 07:00:32 +03:00
kubetest --provider=skeleton --test --test_args=”--ginkgo.focus=\[Conformance\]” --extract ${K8S_VERSION} | tee test.out
2019-03-20 07:34:49 +03:00
```
2019-03-20 17:35:47 +03:00
This could take about 1.5 to 2 hours. The number of tests run and passed will be displayed at the end.
Next: [Dynamic Kubelet configuration](17-extra-dynamic-kubelet-configuration.md)