@@ -80,39 +80,79 @@ cluster](https://kind.sigs.k8s.io/docs/user/quick-start/#installation):
80801. Exercise Kubernetes API. For example, build and run Conformance tests from
8181Kubernetes repository (this usually takes 30-40m or will time out after 1 hour):
8282
83- ` ` ` shell
84- make WHAT=" test/e2e/e2e.test"
85- ./_output/bin/e2e.test \
86- -context kind-kind-with-external-etcd \
87- -ginkgo.focus=" \[sig-apps\].*Conformance" \
88- -num-nodes 2
89- build/run.sh make test-cmd
90- ` ` `
83+ ` ` ` shell
84+ make WHAT=" test/e2e/e2e.test"
85+ ./_output/bin/e2e.test \
86+ -context kind-kind-with-external-etcd \
87+ -ginkgo.focus=" \[sig-apps\].*Conformance" \
88+ -num-nodes 2
89+ build/run.sh make test-cmd
90+ ` ` `
9191
92921. Download traces and put them into ` tests/robustness/coverage/testdata`
9393directory in Etcd git repository:
9494
95- ` ` ` shell
96- curl -v --get --retry 10 --retry-connrefused -o testdata/demo_traces.json \
97- -H " Content-Type: application/json" \
98- --data-urlencode " query.start_time_min=$( date --date=" 5 days ago" -Ins) " \
99- --data-urlencode " query.start_time_max=$( date --date=" 2 minutes ago" -Ins) " \
100- --data-urlencode " query.service_name=etcd" \
101- " http://192.168.32.1:16686/api/v3/traces"
102- ` ` `
95+ ` ` ` shell
96+ curl -v --get --retry 10 --retry-connrefused -o testdata/demo_traces.json \
97+ -H " Content-Type: application/json" \
98+ --data-urlencode " query.start_time_min=$( date --date=" 5 days ago" -Ins) " \
99+ --data-urlencode " query.start_time_max=$( date --date=" 2 minutes ago" -Ins) " \
100+ --data-urlencode " query.service_name=etcd" \
101+ " http://192.168.32.1:16686/api/v3/traces"
102+ ` ` `
103103
1041041. Run Go test
105105
106- ` ` ` shell
107- go test -v -timeout 60s go.etcd.io/etcd/tests/v3/robustness/coverage
108- ` ` `
106+ ` ` ` shell
107+ go test -v -timeout 60s go.etcd.io/etcd/tests/v3/robustness/coverage
108+ ` ` `
109109
1101101. Clean up the environment
111111
112- ` ` ` shell
113- kind delete cluster --name kind-with-external-etcd
114- docker network rm kind-with-external-etcd
115- ` ` `
112+ ` ` ` shell
113+ kind delete cluster --name kind-with-external-etcd
114+ docker network rm kind-with-external-etcd
115+ ` ` `
116+
117+ # ## Manual trace collection from robustness tests
118+
119+ 1. Run [Jaeger](https://www.jaegertracing.io/) container:
120+
121+ ` ` ` shell
122+ docker run --rm --name jaeger \
123+ -p 16686:16686 \
124+ -p 4317:4317 \
125+ jaegertracing/jaeger:2.6.0 --set=extensions.jaeger_storage.backends.some_storage.memory.max_traces=20000000
126+ ` ` `
127+
128+ 1. Run robustness tests. For example:
129+
130+ ` ` ` shell
131+ env \
132+ TRACING_SERVER_ADDR=localhost:4317 \
133+ GO_TEST_FLAGS=' --timeout 10m --count=1 -v --run "^TestRobustness.*/Kubernetes.*"' \
134+ make test-robustness
135+ ` ` `
136+
137+ 1. Download traces and put them into ` tests/robustness/coverage/testdata`
138+ directory in Etcd git repository:
139+
140+ ` ` ` shell
141+ curl -v --get --retry 10 --retry-connrefused -o testdata/demo_traces.json \
142+ -H " Content-Type: application/json" \
143+ --data-urlencode " query.start_time_min=$( date --date=" 5 days ago" -Ins) " \
144+ --data-urlencode " query.start_time_max=$( date -Ins) " \
145+ --data-urlencode " query.service_name=etcd" \
146+ " http://localhost:16686/api/v3/traces"
147+ ` ` `
148+
149+ 1. Run Go test
150+
151+ ` ` ` shell
152+ go test -v -timeout 60s go.etcd.io/etcd/tests/v3/robustness/coverage
153+ ` ` `
154+
155+ It will show the coverage of Kubernetes-Etcd surface by robustness tests.:w
116156
117157# ## Automated test execution
118158
0 commit comments