You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/10/08 12:39:47 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #7856: Replace log e2e cases to e2e-v2

kezhenxu94 commented on a change in pull request #7856:
URL: https://github.com/apache/skywalking/pull/7856#discussion_r724968826



##########
File path: .github/workflows/e2e.log.yaml
##########
@@ -39,9 +39,23 @@ jobs:
     timeout-minutes: 90
     strategy:
       matrix:
-        storage: ['h2', 'mysql', 'es6', 'es7', 'es7.14', 'influxdb']
-    env:
-      SW_STORAGE: ${{ matrix.storage }}
+        case:
+          - name: h2
+            config-file: log/h2/e2e.yaml
+          - name: mysql
+            config-file: log/mysql/e2e.yaml
+          - name: es6
+            config-file: log/es6/e2e.yaml
+          - name: es7
+            config-file: log/es7/e2e.yaml
+          - name: es7.14
+            config-file: log/es7.14/e2e.yaml

Review comment:
       Can you take a look at `e2e.storages.yaml` and use the same style to set up ElasticSearch related cases? We need to test as many versions as possible with ease now that we are using our own ES client

##########
File path: test/e2e-v2/cases/log/es6/e2e.yaml
##########
@@ -0,0 +1,70 @@
+# 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.
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 1200
+  init-system-environment: ../../../script/env
+  steps:
+    - name: install yq
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+    - name: install swctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+    - name: install etcdctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
+
+cleanup:
+  on: success

Review comment:
       Let's remove this as we have this https://github.com/apache/skywalking-infra-e2e/blob/main/docs/en/setup/Configuration-File.md#cleanup
   
   > If the on option under cleanup is not set, it will be automatically set to always if there is environment variable CI=true, which is present on many popular CI services, such as GitHub Actions, CircleCI, etc., otherwise it will be set to success, so the testing environment can be preserved when tests failed in your local machine.

##########
File path: test/e2e-v2/cases/log/es6/e2e.yaml
##########
@@ -0,0 +1,70 @@
+# 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.
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 1200
+  init-system-environment: ../../../script/env
+  steps:
+    - name: install yq
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+    - name: install swctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+    - name: install etcdctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
+
+cleanup:
+  on: success
+
+trigger:
+  action: http
+  interval: 10s
+  times: 10
+  url: http://${consumer_host}:${consumer_9092}/info
+  method: POST
+
+verify:
+  # verify with retry strategy
+  retry:
+    # max retry count
+    count: 20
+    # the interval between two retries, in millisecond.
+    interval: 10s
+  cases:
+    # service list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
+      expected: ../expected/service.yml
+    # service endpoint
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls | yq e '.[]|select(.name=="e2e-service-provider").id' - \
+        )

Review comment:
       We can now use `--service-name` directly, no need `$( \
              swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls | yq e '.[]|select(.name=="e2e-service-provider").id' - \
            )`

##########
File path: test/e2e-v2/cases/log/es6/e2e.yaml
##########
@@ -0,0 +1,70 @@
+# 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.
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 1200
+  init-system-environment: ../../../script/env
+  steps:
+    - name: install yq
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+    - name: install swctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+    - name: install etcdctl
+      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
+
+cleanup:
+  on: success
+
+trigger:
+  action: http
+  interval: 10s
+  times: 10
+  url: http://${consumer_host}:${consumer_9092}/info
+  method: POST
+
+verify:
+  # verify with retry strategy
+  retry:
+    # max retry count
+    count: 20
+    # the interval between two retries, in millisecond.
+    interval: 10s
+  cases:
+    # service list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
+      expected: ../expected/service.yml
+    # service endpoint
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls | yq e '.[]|select(.name=="e2e-service-provider").id' - \
+        )
+      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
+      expected: ../expected/service-instance.yml
+    # logs
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-id=$( \

Review comment:
       Same here

##########
File path: test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/log/FluentBitE2E.java
##########
@@ -31,7 +31,7 @@
 public class FluentBitE2E extends LogE2E {
     @SuppressWarnings("unused")
     @DockerCompose({
-        "docker/log/docker-compose.fluentbit.yml"
+        "docker/log/docker-compose.yml"

Review comment:
       Do not change this for now




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org