test: fix unstable log cases (#9601)

This commit is contained in:
kezhenxu94 2022-09-14 07:13:31 +08:00 committed by GitHub
parent 96faed0185
commit e4ad2580e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 42 deletions

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
retry:

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy

View File

@ -20,8 +20,8 @@ logs:
serviceid: {{ b64enc "e2e-service-provider" }}.1
serviceinstancename: provider1
serviceinstanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
endpointname: POST:/users
endpointid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
endpointname: GET:/logs/trigger
endpointid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "GET:/logs/trigger" }}
traceid: {{ .traceid }}
timestamp: {{ gt .timestamp 0 }}
contenttype: TEXT

View File

@ -14,6 +14,6 @@
# limitations under the License.
{{- contains .}}
- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
name: POST:/users
{{- end}}
- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "GET:/logs/trigger" }}
name: GET:/logs/trigger
{{- end}}

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy

View File

@ -18,7 +18,7 @@
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service layer GENERAL
expected: expected/service.yml
# service endpoint
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=logs --service-name=e2e-service-provider
expected: expected/service-endpoint.yml
# service instance list
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
@ -27,6 +27,6 @@
- query: |
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-name=e2e-service-provider --tags level=INFO --trace-id=$( \
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
| yq e '.traces | select(.[].endpointnames[0]=="POST:/users") | .[0].traceids[0]' -
| yq e '.traces | select(.[].endpointnames[0]=="GET:/logs/trigger") | sort_by(.start) | reverse | .[0].traceids[0]' -
)
expected: expected/logs.yml

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy

View File

@ -32,11 +32,8 @@ trigger:
action: http
interval: 3s
times: 10
url: http://${provider_host}:${provider_9090}/users
method: POST
body: '{"id":"123","name":"skywalking"}'
headers:
"Content-Type": "application/json"
url: http://${provider_host}:${provider_9090}/logs/trigger
method: GET
verify:
# verify with retry strategy