Skip to content

Commit

Permalink
Merge branch 'main' of github.com:chunriyeqiongsaigao/skywalking-infr…
Browse files Browse the repository at this point in the history
…a-e2e into main
  • Loading branch information
chunriyeqiongsaigao committed Sep 14, 2023
2 parents 4978152 + d56f434 commit 4c81a4e
Show file tree
Hide file tree
Showing 7 changed files with 184 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ verify:
#
# - name: currency & non-fail-fast mode
# query: './bin/linux/e2e verify -c ./test/e2e/concurrency/non-fail-fast/internal/verify.yaml --summary-only -o yaml'
# expected: ./concurrency/non-fail-fast/expected.yaml
# expected: ./concurrency/non-fail-fast/expected.yaml

23 changes: 23 additions & 0 deletions test/e2e/fail-fast/expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Licensed to 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. Apache Software Foundation (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.

passed:
- case-1
- case-2
failed:
- case-3
skipped: []
25 changes: 25 additions & 0 deletions test/e2e/fail-fast/internal/expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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.

# This file is used to show how to write configuration files and can be used to test.

args:
case: success
headers:
Accept: application/json
Host: 127.0.0.1:8080
User-Agent: curl/7.81.0
origin: 172.18.0.1
url: http://127.0.0.1:8080/get?case=success
41 changes: 41 additions & 0 deletions test/e2e/fail-fast/internal/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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.

# This file is used to show how to write configuration files and can be used to test.

verify:
# verify with retry strategy
retry:
# max retry count
count: 5
# the interval between two attempts, e.g. 10s, 1m.
interval: 1s

# when a case fails, whether to stop verifying other cases. This property defaults to true.
fail-fast: true
# Whether to verify cases concurrently. This property defaults to false.
concurrency: false


cases:
- name: case-1
query: 'curl -s 127.0.0.1:8080/get?case=success -H "accept: application/json"'
expected: ./expected.yaml
- name: case-2
query: 'curl -s 127.0.0.1:8080/get?case=success -H "accept: application/json"'
expected: ./expected.yaml
- name: case-3
query: 'curl -s 127.0.0.1:8080/get?case=failure -H "accept: application/json"'
expected: ./expected.yaml
24 changes: 24 additions & 0 deletions test/e2e/non-fail-fast/expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to 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. Apache Software Foundation (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.

passed:
- case-1
- case-2
- case-4
failed:
- case-3
skipped: []
25 changes: 25 additions & 0 deletions test/e2e/non-fail-fast/internal/expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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.

# This file is used to show how to write configuration files and can be used to test.

args:
case: success
headers:
Accept: application/json
Host: 127.0.0.1:8080
User-Agent: curl/7.81.0
origin: 172.18.0.1
url: http://127.0.0.1:8080/get?case=success
44 changes: 44 additions & 0 deletions test/e2e/non-fail-fast/internal/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.

# This file is used to show how to write configuration files and can be used to test.

verify:
# verify with retry strategy
retry:
# max retry count
count: 5
# the interval between two attempts, e.g. 10s, 1m.
interval: 1s

# when a case fails, whether to stop verifying other cases. This property defaults to true.
fail-fast: false
# Whether to verify cases concurrently. This property defaults to false.
concurrency: false


cases:
- name: case-1
query: 'curl -s 127.0.0.1:8080/get?case=success -H "accept: application/json"'
expected: ./expected.yaml
- name: case-2
query: 'curl -s 127.0.0.1:8080/get?case=success -H "accept: application/json"'
expected: ./expected.yaml
- name: case-3
query: 'curl -s 127.0.0.1:8080/get?case=failure -H "accept: application/json"'
expected: ./expected.yaml
- name: case-4
query: 'curl -s 127.0.0.1:8080/get?case=success -H "accept: application/json"'
expected: ./expected.yaml

0 comments on commit 4c81a4e

Please sign in to comment.