You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2021/11/23 05:51:43 UTC

[skywalking-swck] branch master updated: add e2e-test(oap+ui+internel/external storage) (#49)

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-swck.git


The following commit(s) were added to refs/heads/master by this push:
     new 9453959  add e2e-test(oap+ui+internel/external storage) (#49)
9453959 is described below

commit 945395962e4694937a28ecd7df6e66205d9caf02
Author: dashanji <71...@users.noreply.github.com>
AuthorDate: Tue Nov 23 13:51:38 2021 +0800

    add e2e-test(oap+ui+internel/external storage) (#49)
    
    * add e2e-test(oap+ui+internel/external storage)
---
 .github/workflows/go.yml                           | 40 ++++++++++++++++--
 Makefile                                           |  8 +++-
 test/e2e/demo.yaml                                 |  2 +-
 test/e2e/{demo.yaml => deploy-elasticsearch.yaml}  | 46 ++++++++++-----------
 test/e2e/external-storage.yaml                     | 26 ++++++++++++
 test/e2e/internal-storage.yaml                     | 29 +++++++++++++
 .../{ => oap-ui-agent-external-storage}/e2e.yaml   | 48 ++++++++++++----------
 .../{ => oap-ui-agent-internal-storage}/e2e.yaml   | 44 ++++++++++----------
 test/e2e/{ => oap-ui-agent}/e2e.yaml               | 19 ++++-----
 test/e2e/oapserver-cases.yaml                      | 25 +++++++++++
 test/e2e/skywalking-components-with-storage.yaml   | 47 +++++++++++++++++++++
 test/e2e/ui-cases.yaml                             | 21 ++++++++++
 test/e2e/verify/indices.yaml                       | 19 +++++++++
 13 files changed, 290 insertions(+), 84 deletions(-)

diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 0fad3f2..252397b 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -93,13 +93,47 @@ jobs:
         uses: actions/checkout@v2
       - name: Update dependencies
         run: GOPROXY=https://proxy.golang.org go mod download
-      - name: Run E2E Test
+      - name: Run E2E Test(oap+ui+agent)
         uses: apache/skywalking-infra-e2e@996ed8902e941e2883fcf0ac5b3090364942d205      # always prefer to use a revision instead of `main`.
         with:
-          e2e-file: test/e2e/e2e.yaml               # need to run E2E file path
+          e2e-file: test/e2e/oap-ui-agent/e2e.yaml               # need to run E2E file path
+  internel-storage-e2e-tests:
+    name: e2e tests(oap+ui+agent+internel-storage)
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.17
+        id: go
+      - name: Check out code into the Go module directory
+        uses: actions/checkout@v2
+      - name: Update dependencies
+        run: GOPROXY=https://proxy.golang.org go mod download
+      - name: Run E2E Test
+        uses: apache/skywalking-infra-e2e@996ed8902e941e2883fcf0ac5b3090364942d205     
+        with:
+          e2e-file: test/e2e/oap-ui-agent-internal-storage/e2e.yaml   
+  external-storage-e2e-tests:          
+    name: e2e tests(oap+ui+agent+external-storage)
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.17
+        id: go
+      - name: Check out code into the Go module directory
+        uses: actions/checkout@v2
+      - name: Update dependencies
+        run: GOPROXY=https://proxy.golang.org go mod download
+      - name: Run E2E Test
+        uses: apache/skywalking-infra-e2e@996ed8902e941e2883fcf0ac5b3090364942d205
+        with:
+          e2e-file: test/e2e/oap-ui-agent-external-storage/e2e.yaml             
   checks:
     name: build
     runs-on: ubuntu-20.04
-    needs: [check, build, unit-tests, e2e-tests]
+    needs: [check, build, unit-tests, e2e-tests, internel-storage-e2e-tests, external-storage-e2e-tests]
     steps:
       - run: echo 'success'
diff --git a/Makefile b/Makefile
index 3143263..3e4851a 100644
--- a/Makefile
+++ b/Makefile
@@ -52,8 +52,12 @@ test: generate operator-manifests
 
 # Run e2e-test
 e2e-test:
-	@echo "Run e2e..."
-	e2e run -c test/e2e/e2e.yaml
+	@echo "Run oap+ui+agent e2e..."
+	e2e run -c test/e2e/oap-ui-agent/e2e.yaml
+	@echo "Run oap+ui+agent+storage(internal) e2e..."
+	e2e run -c test/e2e/oap-ui-agent-internal-storage/e2e.yaml
+	@echo "Run oap+ui+agent+storage(external) e2e..."
+	e2e run -c test/e2e/oap-ui-agent-external-storage/e2e.yaml
 
 # Build manager binary
 operator: generate
diff --git a/test/e2e/demo.yaml b/test/e2e/demo.yaml
index fb1e2f1..e9acb7e 100644
--- a/test/e2e/demo.yaml
+++ b/test/e2e/demo.yaml
@@ -29,7 +29,7 @@ spec:
         app: demo
       annotations:
         strategy.skywalking.apache.org/agent.Overlay: "true"
-        agent.skywalking.apache.org/collector.backend_service: "skywalking-system-oap.skywalking-system:11800"
+        agent.skywalking.apache.org/collector.backend_service: "oap-service:11800"
     spec:
       containers:
       - name: demo1
diff --git a/test/e2e/demo.yaml b/test/e2e/deploy-elasticsearch.yaml
similarity index 57%
copy from test/e2e/demo.yaml
copy to test/e2e/deploy-elasticsearch.yaml
index fb1e2f1..7bb7c83 100644
--- a/test/e2e/demo.yaml
+++ b/test/e2e/deploy-elasticsearch.yaml
@@ -14,43 +14,39 @@
 # limitations under the License.
 
 apiVersion: apps/v1
-kind: Deployment
+kind: StatefulSet
 metadata:
-  name: demo
-  namespace: skywalking-system
+  name: es
+  labels:
+    k8s-app: es
 spec:
+  replicas: 1
+  serviceName: es
   selector:
     matchLabels:
-      app: demo
+      k8s-app: es
   template:
     metadata:
       labels:
-        swck-java-agent-injected: "true"
-        app: demo
-      annotations:
-        strategy.skywalking.apache.org/agent.Overlay: "true"
-        agent.skywalking.apache.org/collector.backend_service: "skywalking-system-oap.skywalking-system:11800"
+        k8s-app: es
     spec:
       containers:
-      - name: demo1
-        imagePullPolicy: IfNotPresent
-        image: ghcr.io/apache/skywalking-swck-spring-demo:v0.0.1
-        command: ["java"]
-        args: ["$(AGENT_OPTS)","-jar","/app.jar"]
-        ports:
-          - containerPort: 8085
+      - name: es
+        image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
+        env:
+        - name: discovery.type
+          value: single-node
 ---
 apiVersion: v1
 kind: Service
 metadata:
-  name: demo
-  namespace: skywalking-system
+  name: es-out
+  labels:
+    k8s-app: es
 spec:
-  type: ClusterIP
-  ports:
-  - name: 8085-tcp
-    port: 8085
-    protocol: TCP
-    targetPort: 8085
   selector:
-    app: demo
+    k8s-app: es
+  ports:
+  - name: out
+    port: 9200
+    protocol: TCP
\ No newline at end of file
diff --git a/test/e2e/external-storage.yaml b/test/e2e/external-storage.yaml
new file mode 100644
index 0000000..2f73041
--- /dev/null
+++ b/test/e2e/external-storage.yaml
@@ -0,0 +1,26 @@
+# 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.
+
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: Storage
+metadata:
+  name: sample
+spec:
+  type: elasticsearch
+  connectType: external
+  address: "http://es-out.default:9200"  #please use your elasticsearch cluster's address
+  security:
+    user:
+      secretName: default
\ No newline at end of file
diff --git a/test/e2e/internal-storage.yaml b/test/e2e/internal-storage.yaml
new file mode 100644
index 0000000..c4af7d6
--- /dev/null
+++ b/test/e2e/internal-storage.yaml
@@ -0,0 +1,29 @@
+# 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.
+
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: Storage
+metadata:
+  name: sample
+spec:
+  type: elasticsearch
+  connectType: internal
+  version: 7.5.1
+  instances: 1
+  image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1
+  security:
+    user:
+      secretName: default
+    tls: true
\ No newline at end of file
diff --git a/test/e2e/e2e.yaml b/test/e2e/oap-ui-agent-external-storage/e2e.yaml
similarity index 61%
copy from test/e2e/e2e.yaml
copy to test/e2e/oap-ui-agent-external-storage/e2e.yaml
index 570a4df..550b495 100644
--- a/test/e2e/e2e.yaml
+++ b/test/e2e/oap-ui-agent-external-storage/e2e.yaml
@@ -15,7 +15,7 @@
 
 setup:
   env: kind
-  file: kind.yaml
+  file: ../kind.yaml
   steps:
     - name: prepare e2e.yaml
       command: bash hack/prepare-e2e.sh
@@ -42,13 +42,24 @@ setup:
     - name: wait webhook installing
       command: |
         bash hack/wait-webhook.sh
+    - name: setup elasticsearch
+      command: |
+        kubectl apply -f test/e2e/deploy-elasticsearch.yaml
+      wait:
+        - namespace: default
+          resource: pod
+          label-selector: k8s-app=es
+          for: condition=Ready
+    - name: setup storage(use the external type)
+      command: |
+        kubectl apply -f test/e2e/external-storage.yaml
     - name: setup oapserver and ui
       command: |
         kubectl create namespace skywalking-system
-        kubectl apply -f test/e2e/skywalking-components.yaml
+        kubectl apply -f test/e2e/skywalking-components-with-storage.yaml
       wait:
-        - namespace: skywalking-system
-          resource: OAPServer/skywalking-system
+        - namespace: default
+          resource: OAPServer/default
           for: condition=Available
         - namespace: skywalking-system
           resource: UI/skywalking-system
@@ -56,7 +67,7 @@ setup:
     - name: setup java agent demo
       command: |
         kubectl label namespace skywalking-system swck-injection=enabled
-        kubectl apply -f test/e2e/demo.yaml
+        sed 's/oap-service/default-oap.default/' test/e2e/demo.yaml | kubectl create -f -
       wait:
         - namespace: skywalking-system
           resource: deployment/demo
@@ -66,12 +77,15 @@ setup:
       - namespace: skywalking-system
         resource: service/demo 
         port: 8085
-      - namespace: skywalking-system
-        resource: service/skywalking-system-oap
+      - namespace: default
+        resource: service/default-oap
         port: 12800
       - namespace: skywalking-system
         resource: service/skywalking-system-ui
         port: 80
+      - namespace: default
+        resource: service/es-out
+        port: 9200
   timeout: 20m
 
 cleanup:
@@ -93,17 +107,9 @@ verify:
     # the interval between two attempts, e.g. 10s, 1m.
     interval: 10s
   cases:
-    # test oapserver
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql service ls
-      expected: verify/service.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
-    # test ui
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql service ls
-      expected: verify/service.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
\ No newline at end of file
+    - includes:
+        - ../oapserver-cases.yaml
+        - ../ui-cases.yaml
+    # confirm whether the data are stored in the es
+    - query: 'curl -u "elastic:changeme" -k "http://${service_es_out_host}:${service_es_out_9200}/_cat/indices?v" 2>&1 | grep sw_metrics | cut -d " " -f 5 | sed ''/^$/d'' | yq e ''{"indices": .}'' - | yq e ''to_entries'' -'
+      expected: ../verify/indices.yaml
\ No newline at end of file
diff --git a/test/e2e/e2e.yaml b/test/e2e/oap-ui-agent-internal-storage/e2e.yaml
similarity index 61%
copy from test/e2e/e2e.yaml
copy to test/e2e/oap-ui-agent-internal-storage/e2e.yaml
index 570a4df..41fdfe4 100644
--- a/test/e2e/e2e.yaml
+++ b/test/e2e/oap-ui-agent-internal-storage/e2e.yaml
@@ -15,7 +15,7 @@
 
 setup:
   env: kind
-  file: kind.yaml
+  file: ../kind.yaml
   steps:
     - name: prepare e2e.yaml
       command: bash hack/prepare-e2e.sh
@@ -42,13 +42,20 @@ setup:
     - name: wait webhook installing
       command: |
         bash hack/wait-webhook.sh
+    - name: setup storage(use the internal type)
+      command: |
+        kubectl apply -f test/e2e/internal-storage.yaml
+      wait:
+        - namespace: default
+          resource: Storage/sample
+          for: condition=Ready
     - name: setup oapserver and ui
       command: |
         kubectl create namespace skywalking-system
-        kubectl apply -f test/e2e/skywalking-components.yaml
+        kubectl apply -f test/e2e/skywalking-components-with-storage.yaml
       wait:
-        - namespace: skywalking-system
-          resource: OAPServer/skywalking-system
+        - namespace: default
+          resource: OAPServer/default
           for: condition=Available
         - namespace: skywalking-system
           resource: UI/skywalking-system
@@ -56,7 +63,7 @@ setup:
     - name: setup java agent demo
       command: |
         kubectl label namespace skywalking-system swck-injection=enabled
-        kubectl apply -f test/e2e/demo.yaml
+        sed 's/oap-service/default-oap.default/' test/e2e/demo.yaml | kubectl create -f -
       wait:
         - namespace: skywalking-system
           resource: deployment/demo
@@ -66,12 +73,15 @@ setup:
       - namespace: skywalking-system
         resource: service/demo 
         port: 8085
-      - namespace: skywalking-system
-        resource: service/skywalking-system-oap
+      - namespace: default
+        resource: service/default-oap
         port: 12800
       - namespace: skywalking-system
         resource: service/skywalking-system-ui
         port: 80
+      - namespace: default
+        resource: service/skywalking-storage
+        port: 9200
   timeout: 20m
 
 cleanup:
@@ -93,17 +103,9 @@ verify:
     # the interval between two attempts, e.g. 10s, 1m.
     interval: 10s
   cases:
-    # test oapserver
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql service ls
-      expected: verify/service.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
-    # test ui
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql service ls
-      expected: verify/service.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
\ No newline at end of file
+    - includes:
+        - ../oapserver-cases.yaml
+        - ../ui-cases.yaml
+    # confirm whether the data are stored in the es
+    - query: 'curl -u "elastic:changeme" -k "https://${service_skywalking_storage_host}:${service_skywalking_storage_9200}/_cat/indices?v" 2>&1 | grep sw_metrics | cut -d " " -f 5 | sed ''/^$/d'' | yq e ''{"indices": .}'' - | yq e ''to_entries'' -'
+      expected: ../verify/indices.yaml
\ No newline at end of file
diff --git a/test/e2e/e2e.yaml b/test/e2e/oap-ui-agent/e2e.yaml
similarity index 85%
rename from test/e2e/e2e.yaml
rename to test/e2e/oap-ui-agent/e2e.yaml
index 570a4df..62f4c8b 100644
--- a/test/e2e/e2e.yaml
+++ b/test/e2e/oap-ui-agent/e2e.yaml
@@ -15,7 +15,7 @@
 
 setup:
   env: kind
-  file: kind.yaml
+  file: ../kind.yaml
   steps:
     - name: prepare e2e.yaml
       command: bash hack/prepare-e2e.sh
@@ -56,7 +56,7 @@ setup:
     - name: setup java agent demo
       command: |
         kubectl label namespace skywalking-system swck-injection=enabled
-        kubectl apply -f test/e2e/demo.yaml
+        sed 's/oap-service/skywalking-system-oap.skywalking-system/' test/e2e/demo.yaml | kubectl create -f -
       wait:
         - namespace: skywalking-system
           resource: deployment/demo
@@ -95,15 +95,12 @@ verify:
   cases:
     # test oapserver
     - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql service ls
-      expected: verify/service.yaml
+      expected: ../verify/service.yaml
     - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
+      expected: ../verify/metrics.yaml
     - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
+      expected: ../verify/endpoint.yaml
     - query: swctl --display yaml --base-url=http://${service_skywalking_system_oap_host}:${service_skywalking_system_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' -
-      expected: verify/metrics.yaml
-    # test ui
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql service ls
-      expected: verify/service.yaml
-    - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
-      expected: verify/endpoint.yaml
\ No newline at end of file
+      expected: ../verify/metrics.yaml
+    - includes:
+        - ../ui-cases.yaml
\ No newline at end of file
diff --git a/test/e2e/oapserver-cases.yaml b/test/e2e/oapserver-cases.yaml
new file mode 100644
index 0000000..d47b753
--- /dev/null
+++ b/test/e2e/oapserver-cases.yaml
@@ -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.
+
+cases:
+  # test oapserver
+  - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql service ls
+    expected: verify/service.yaml
+  - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name service_cpm --service-name Your_ApplicationName | yq e 'to_entries' -
+    expected: verify/metrics.yaml
+  - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
+    expected: verify/endpoint.yaml
+  - query: swctl --display yaml --base-url=http://${service_default_oap_host}:${service_default_oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name GET:/hello --service-name Your_ApplicationName | yq e 'to_entries' -
+    expected: verify/metrics.yaml
\ No newline at end of file
diff --git a/test/e2e/skywalking-components-with-storage.yaml b/test/e2e/skywalking-components-with-storage.yaml
new file mode 100644
index 0000000..168876e
--- /dev/null
+++ b/test/e2e/skywalking-components-with-storage.yaml
@@ -0,0 +1,47 @@
+# 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.
+
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: OAPServer
+metadata:
+  name: default
+spec:
+  version: 8.8.1
+  instances: 1
+  image: apache/skywalking-oap-server:8.8.1
+  service:
+    template:
+      type: ClusterIP
+  storage:
+    name: sample
+---
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: UI 
+metadata:
+  name: skywalking-system
+  namespace: skywalking-system
+spec:
+  version: 8.8.1
+  instances: 1
+  image: apache/skywalking-ui:8.8.1
+  OAPServerAddress: http://default-oap.default:12800
+  service:
+    template:
+      type: ClusterIP
+    ingress:
+      host: demo.ui.skywalking
+    
\ No newline at end of file
diff --git a/test/e2e/ui-cases.yaml b/test/e2e/ui-cases.yaml
new file mode 100644
index 0000000..ebc5953
--- /dev/null
+++ b/test/e2e/ui-cases.yaml
@@ -0,0 +1,21 @@
+# 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.
+
+cases:
+  # test ui
+  - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql service ls
+    expected: verify/service.yaml
+  - query: swctl --display yaml --base-url=http://${service_skywalking_system_ui_host}:${service_skywalking_system_ui_80}/graphql endpoint list --keyword=hello --service-name Your_ApplicationName
+    expected: verify/endpoint.yaml
\ No newline at end of file
diff --git a/test/e2e/verify/indices.yaml b/test/e2e/verify/indices.yaml
new file mode 100644
index 0000000..f3c0917
--- /dev/null
+++ b/test/e2e/verify/indices.yaml
@@ -0,0 +1,19 @@
+# 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.
+
+{{- contains . }}
+- key: "indices"
+  value: {{ notEmpty .value }}
+{{- end }}
\ No newline at end of file