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/23 03:06:55 UTC

[GitHub] [skywalking-client-js] arugal commented on a change in pull request #67: Add e2e tese based on skywaling-infra-e2e

arugal commented on a change in pull request #67:
URL: https://github.com/apache/skywalking-client-js/pull/67#discussion_r734916521



##########
File path: test/e2e.yaml
##########
@@ -0,0 +1,143 @@
+# 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: env
+  steps:
+    - name: install yq
+      command: |-
+        BASE_DIR=/tmp/skywalking-infra-e2e
+        BIN_DIR=/usr/local/bin
+
+        if ! command -v yq &> /dev/null; then
+          mkdir -p $BASE_DIR/yq && cd $BASE_DIR/yq
+          curl -kLo yq.tar.gz https://github.com/mikefarah/yq/archive/v4.11.1.tar.gz
+          tar -zxf yq.tar.gz --strip=1
+          go install && go build -ldflags -s && cp yq $BIN_DIR/
+        fi
+    - name: install swctl
+      command: |-
+        BASE_DIR=/tmp/skywalking-infra-e2e
+        BIN_DIR=/usr/local/bin
+
+        if ! command -v swctl &> /dev/null; then
+          mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
+          curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
+          tar -zxf skywalking-cli.tar.gz --strip=1
+          utype=$(uname | awk '{print tolower($0)}')
+          make $utype && mv bin/swctl-*-$utype-amd64 $BIN_DIR/swctl
+        fi
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 3s
+  times: 5
+  url: http://127.0.0.1:${ui_8080}/
+  method: GET
+
+verify:
+  # verify with retry strategy
+  retry:
+    # max retry count
+    count: 20
+    # the interval between two retries, in millisecond.
+    interval: 3s
+  cases:
+    # service
+    - expected: expected/service.yml
+      query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql browser service ls test-ui
+    # version
+    - expected: expected/version.yml
+      query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql browser version ls --service-name test-ui
+    # page
+    - expected: expected/page.yml
+      query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql browser page ls --service-name test-ui
+    # browser error log
+    - expected: expected/error-log.yml
+      query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql browser logs ls --service-name test-ui --version-name v1.0.0
+    # browser service metrics
+    - expected: expected/metrics-has-value.yml
+      query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear \
+          --name=browser_app_pv --service-id dGVzdC11aQ==.1 |yq e 'to_entries' -

Review comment:
       browser `service-name` need to be [ParseBrowserService](https://github.com/apache/skywalking-cli/blob/master/internal/commands/interceptor/service.go#L54), we also need to add the following commands:
   
   + swctl browser metrics linear
   + swctl browser metrics multiple-linear
   




-- 
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