@@ -80,39 +80,79 @@ cluster](https://kind.sigs.k8s.io/docs/user/quick-start/#installation):
80
80
1. Exercise Kubernetes API. For example, build and run Conformance tests from
81
81
Kubernetes repository (this usually takes 30-40m or will time out after 1 hour):
82
82
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
+ ` ` `
91
91
92
92
1. Download traces and put them into ` tests/robustness/coverage/testdata`
93
93
directory in Etcd git repository:
94
94
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
+ ` ` `
103
103
104
104
1. Run Go test
105
105
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
+ ` ` `
109
109
110
110
1. Clean up the environment
111
111
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
116
156
117
157
# ## Automated test execution
118
158
0 commit comments