| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # HTTP1 verify |
| cases: |
| # slow traces |
| - query: | |
| curl -s -k https://${service_host}:${service_10443}/consumer-zipkin > /dev/null; |
| sleep 5; |
| swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql records list \ |
| --name=sampled_slow_trace_record --service-name service --instance-name test --process-name service \ |
| --dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE 20 |
| expected: expected/slow-traces.yml |
| # zipkin trace |
| # - query: | |
| # curl -s https://${service_host}:${service_10443}/consumer-zipkin > /dev/null; |
| # sleep 3; |
| # traceid=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql records list \ |
| # --name=sampled_slow_trace_record --service-name service --instance-name test --process-name service \ |
| # --dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE 100 | yq e '. | map(select(.name == "zipkin-/provider-zipkin")).[0].id' -); |
| # curl http://${oap_host}:${oap_9412}/zipkin/api/v2/trace/${traceid} | yq e -| yq e 'del(.[].tags)' - |
| # expected: expected/zipkin-trace.yml |
| # skywalking trace |
| - query: | |
| traceid=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql records list \ |
| --name=sampled_slow_trace_record --service-name service --instance-name test --process-name service \ |
| --dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE 100 | yq e '. | map(select(.name == "skywalking-/provider")).[0].id' -); |
| swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $traceid |
| expected: expected/skywalking-trace.yml |
| # not founds |
| - query: | |
| curl -s -k https://${service_host}:${service_10443}/consumer?type=notfound > /dev/null; |
| sleep 5; |
| swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql records list \ |
| --name=sampled_status_4xx_trace_record --service-name service --instance-name test --process-name service \ |
| --dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE 20 |
| expected: expected/status-4xx-traces.yml |
| - query: | |
| curl -s -k https://${service_host}:${service_10443}/consumer?type=error > /dev/null; |
| sleep 5; |
| swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql records list \ |
| --name=sampled_status_5xx_trace_record --service-name service --instance-name test --process-name service \ |
| --dest-service-name service --dest-instance-name test --dest-process-name UNKNOWN_REMOTE 20 |
| expected: expected/status-5xx-traces.yml |