From e62ec3fddc3e39a50e059c01c9c2ebd2c8550d5d Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Tue, 18 Mar 2025 17:01:40 +0000
Subject: [PATCH] OFC25 tests:

- Removed unneeded scripts
- Fixed deploy.sh script
---
 src/tests/ofc25/_old/subscription_ws_e2e.sh | 42 ---------------------
 src/tests/ofc25/_old/subscription_ws_ip.sh  | 42 ---------------------
 src/tests/ofc25/deploy.sh                   | 15 ++------
 3 files changed, 3 insertions(+), 96 deletions(-)
 delete mode 100755 src/tests/ofc25/_old/subscription_ws_e2e.sh
 delete mode 100755 src/tests/ofc25/_old/subscription_ws_ip.sh

diff --git a/src/tests/ofc25/_old/subscription_ws_e2e.sh b/src/tests/ofc25/_old/subscription_ws_e2e.sh
deleted file mode 100755
index 26c430cdf..000000000
--- a/src/tests/ofc25/_old/subscription_ws_e2e.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
-#
-# 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.
-
-
-########################################################################################################################
-# Read deployment settings
-########################################################################################################################
-
-# If not already set, set the namespace where CockroackDB will be deployed.
-export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-e2e"}
-
-# If not already set, set the external port interface will be exposed to.
-export SUBSCRIPTION_WS_EXT_PORT=${SUBSCRIPTION_WS_EXT_PORT:-"8761"}
-
-
-########################################################################################################################
-# Automated steps start here
-########################################################################################################################
-
-
-echo "Subscription WebSocket Port Mapping"
-echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_EXT_PORT}->${SUBSCRIPTION_WS_EXT_PORT})"
-PATCH='{"data": {"'${SUBSCRIPTION_WS_EXT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_EXT_PORT}'"}}'
-kubectl patch configmap nginx-ingress-tcp-microk8s-conf-e2e --namespace ingress --patch "${PATCH}"
-
-PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_EXT_PORT}', "hostPort": '${SUBSCRIPTION_WS_EXT_PORT}'}'
-CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
-PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
-kubectl patch daemonset nginx-ingress-microk8s-controller-e2e --namespace ingress --patch "${PATCH}"
-echo
diff --git a/src/tests/ofc25/_old/subscription_ws_ip.sh b/src/tests/ofc25/_old/subscription_ws_ip.sh
deleted file mode 100755
index 379929d73..000000000
--- a/src/tests/ofc25/_old/subscription_ws_ip.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
-#
-# 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.
-
-
-########################################################################################################################
-# Read deployment settings
-########################################################################################################################
-
-# If not already set, set the namespace where CockroackDB will be deployed.
-export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-ip"}
-
-# If not already set, set the external port interface will be exposed to.
-export SUBSCRIPTION_WS_INT_PORT=${SUBSCRIPTION_WS_INT_PORT:-"8762"}
-########################################################################################################################
-# Automated steps start here
-########################################################################################################################
-
-
-
-
-echo "Subscription WebSocket Port Mapping"
-echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_INT_PORT}->${SUBSCRIPTION_WS_INT_PORT})"
-PATCH='{"data": {"'${SUBSCRIPTION_WS_INT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_INT_PORT}'"}}'
-kubectl patch configmap nginx-ingress-tcp-microk8s-conf-ip --namespace ingress --patch "${PATCH}"
-
-PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_INT_PORT}', "hostPort": '${SUBSCRIPTION_WS_INT_PORT}'}'
-CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
-PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
-kubectl patch daemonset nginx-ingress-microk8s-controller-ip --namespace ingress --patch "${PATCH}"
-echo
diff --git a/src/tests/ofc25/deploy.sh b/src/tests/ofc25/deploy.sh
index 8bd0b8989..fb892e14c 100755
--- a/src/tests/ofc25/deploy.sh
+++ b/src/tests/ofc25/deploy.sh
@@ -47,9 +47,9 @@
 #yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/vntmservice.yaml
 
 # Create secondary ingress controllers
-#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml
-#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml
-#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml
+kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml
+kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml
+kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml
 
 cp manifests/contextservice.yaml manifests/contextservice.yaml.bak
 
@@ -111,13 +111,4 @@ while ! kubectl --namespace tfs-e2e logs deployment/contextservice -c server 2>&
 kubectl --namespace tfs-e2e logs deployment/contextservice -c server
 
 
-# ===== Onboarding topologies =========================
-# TODO: pending...
-
-
-# ===== Configure subscriptions =========================
-# This should not be needed
-#./src/tests/ofc25/subscription_ws_ip.sh
-#./src/tests/ofc25/subscription_ws_e2e.sh
-
 echo "Done!"
-- 
GitLab