Integrated gateway and updated kube support

Restructured the test env to decouple the test engine from the components

Issue-ID: NONRTRIC-441

Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I07c746741b1c5c964679545f0a12861e5e9f6292
diff --git a/test/simulator-group/ngw/.gitignore b/test/simulator-group/ngw/.gitignore
new file mode 100644
index 0000000..59aac41
--- /dev/null
+++ b/test/simulator-group/ngw/.gitignore
@@ -0,0 +1,2 @@
+.tmp.json
+.dockererr
diff --git a/test/simulator-group/ngw/app.yaml b/test/simulator-group/ngw/app.yaml
new file mode 100644
index 0000000..c38de9f
--- /dev/null
+++ b/test/simulator-group/ngw/app.yaml
@@ -0,0 +1,37 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: $NRT_GATEWAY_APP_NAME
+  namespace: $KUBE_NONRTRIC_NAMESPACE
+  labels:
+    run: $NRT_GATEWAY_APP_NAME
+    autotest: NGW
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      run: $NRT_GATEWAY_APP_NAME
+  template:
+    metadata:
+      labels:
+        run: $NRT_GATEWAY_APP_NAME
+        autotest: NGW
+    spec:
+      containers:
+      - name: $NRT_GATEWAY_APP_NAME
+        image: $NRT_GATEWAY_IMAGE
+        imagePullPolicy: Never
+        ports:
+        - name: http
+          containerPort: $NRT_GATEWAY_INTERNAL_PORT
+        - name: https
+          containerPort: $NRT_GATEWAY_INTERNAL_SECURE_PORT
+        volumeMounts:
+        - mountPath: $NRT_GATEWAY_CONFIG_MOUNT_PATH/$NRT_GATEWAY_CONFIG_FILE
+          subPath: $NRT_GATEWAY_CONFIG_FILE
+          name: ngw-conf-name
+      volumes:
+      - configMap:
+          defaultMode: 420
+          name: $NGW_CONFIG_CONFIGMAP_NAME
+        name: ngw-conf-name
diff --git a/test/simulator-group/ngw/application.yaml b/test/simulator-group/ngw/application.yaml
new file mode 100644
index 0000000..c734461
--- /dev/null
+++ b/test/simulator-group/ngw/application.yaml
@@ -0,0 +1,52 @@
+################################################################################
+#   Copyright (c) 2021 Nordix Foundation.                                      #
+#                                                                              #
+#   Licensed 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.                                             #
+################################################################################
+
+server:
+  port: 9090
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        ssl:
+          useInsecureTrustManager: true
+        wiretap: true
+      httpserver:
+        wiretap: true
+      routes:
+      - id: A1-Policy
+        uri: https://${POLICY_AGENT_DOMAIN_NAME}:${POLICY_AGENT_EXTERNAL_SECURE_PORT}
+        predicates:
+        - Path=/a1-policy/**
+      - id: A1-EI
+        uri: https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}
+        predicates:
+        - Path=/ei-producer/**
+management:
+  endpoint:
+    gateway:
+      enabled: true
+  endpoints:
+    web:
+      exposure:
+        include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump"
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.cloud.gateway: INFO
+    reactor.netty: INFO
+  file:
+    name: /var/log/nonrtric-gateway/application.log
diff --git a/test/simulator-group/ngw/docker-compose.yml b/test/simulator-group/ngw/docker-compose.yml
new file mode 100644
index 0000000..c897ba7
--- /dev/null
+++ b/test/simulator-group/ngw/docker-compose.yml
@@ -0,0 +1,36 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed 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.
+#  ============LICENSE_END=================================================
+#
+
+version: '3.0'
+networks:
+  default:
+    external:
+      name: ${DOCKER_SIM_NWNAME}
+services:
+  nonrtric-gateway:
+    image: ${NRT_GATEWAY_IMAGE}
+    container_name: ${NRT_GATEWAY_APP_NAME}
+    networks:
+      - default
+    ports:
+    - ${NRT_GATEWAY_EXTERNAL_PORT}:${NRT_GATEWAY_INTERNAL_PORT}
+#    - ${NRT_GATEWAY_EXTERNAL_SECURE_PORT}:${NRT_GATEWAY_INTERNAL_SECURE_PORT}
+    volumes:
+    - ${NRT_GATEWAY_HOST_MNT_DIR}/$NRT_GATEWAY_CONFIG_FILE:${NRT_GATEWAY_CONFIG_MOUNT_PATH}/$NRT_GATEWAY_CONFIG_FILE
+    labels:
+      - "nrttest_app=NGW"
+      - "nrttest_dp=${NRT_GATEWAY_DISPLAY_NAME}"
diff --git a/test/simulator-group/ngw/svc.yaml b/test/simulator-group/ngw/svc.yaml
new file mode 100644
index 0000000..b86aeaf
--- /dev/null
+++ b/test/simulator-group/ngw/svc.yaml
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: $NRT_GATEWAY_APP_NAME
+  namespace: $KUBE_NONRTRIC_NAMESPACE
+  labels:
+    run: $NRT_GATEWAY_APP_NAME
+    autotest: NGW
+spec:
+  type: ClusterIP
+  ports:
+  - port: $NRT_GATEWAY_EXTERNAL_PORT
+    targetPort: $NRT_GATEWAY_INTERNAL_PORT
+    protocol: TCP
+    name: http
+  - port: $NRT_GATEWAY_EXTERNAL_SECURE_PORT
+    targetPort: $NRT_GATEWAY_INTERNAL_SECURE_PORT
+    protocol: TCP
+    name: https
+  selector:
+    run: $NRT_GATEWAY_APP_NAME