diff --git a/src/tests/ofc25/.gitignore b/src/tests/ofc25-camara-e2e-controller/.gitignore similarity index 100% rename from src/tests/ofc25/.gitignore rename to src/tests/ofc25-camara-e2e-controller/.gitignore diff --git a/src/tests/ofc25/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml similarity index 100% rename from src/tests/ofc25/.gitlab-ci.yml rename to src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25-camara-e2e-controller/Dockerfile similarity index 84% rename from src/tests/ofc25/Dockerfile rename to src/tests/ofc25-camara-e2e-controller/Dockerfile index 2d7d5ce34677fd362aa82a130c0a8e3d80ceee47..79b709c13dc352bb853bbe626183e72d37a074f0 100644 --- a/src/tests/ofc25/Dockerfile +++ b/src/tests/ofc25-camara-e2e-controller/Dockerfile @@ -49,9 +49,9 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/tests/ofc25 -WORKDIR /var/teraflow/tests/ofc25 -COPY src/tests/ofc25/requirements.in requirements.in +RUN mkdir -p /var/teraflow/tests/ofc25-camara-e2e-controller +WORKDIR /var/teraflow/tests/ofc25-camara-e2e-controller +COPY src/tests/ofc25-camara-e2e-controller/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt @@ -72,10 +72,10 @@ COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ COPY src/tests/*.py ./tests/ -COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py -COPY src/tests/ofc25/data/. ./tests/ofc25/data/ -COPY src/tests/ofc25/tests/. ./tests/ofc25/tests/ -COPY src/tests/ofc25/scripts/. ./ +COPY src/tests/ofc25-camara-e2e-controller/__init__.py ./tests/ofc25-camara-e2e-controller/__init__.py +COPY src/tests/ofc25-camara-e2e-controller/data/. ./tests/ofc25-camara-e2e-controller/data/ +COPY src/tests/ofc25-camara-e2e-controller/tests/. ./tests/ofc25-camara-e2e-controller/tests/ +COPY src/tests/ofc25-camara-e2e-controller/scripts/. ./ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install tree && \ diff --git a/src/tests/ofc25/README.md b/src/tests/ofc25-camara-e2e-controller/README.md similarity index 96% rename from src/tests/ofc25/README.md rename to src/tests/ofc25-camara-e2e-controller/README.md index 23522ad6f8537f34df4be65c6ed325546385bd61..187f156f6f77f8de4ee530b68be53964325d86bf 100644 --- a/src/tests/ofc25/README.md +++ b/src/tests/ofc25-camara-e2e-controller/README.md @@ -7,13 +7,13 @@ ## TeraFlowSDN Deployment ```bash cd ~/tfs-ctrl -source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh ./deploy/all.sh ``` ## Deploy scenario ```bash -cd ~/tfs-ctrl/src/tests/ofc25/ +cd ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/ sudo containerlab deploy --topo eucnc24.clab.yml ``` diff --git a/src/tests/ofc25/__init__.py b/src/tests/ofc25-camara-e2e-controller/__init__.py similarity index 100% rename from src/tests/ofc25/__init__.py rename to src/tests/ofc25-camara-e2e-controller/__init__.py diff --git a/src/tests/ofc25/data/camara-e2e-topology.json b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json similarity index 100% rename from src/tests/ofc25/data/camara-e2e-topology.json rename to src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice2.json diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice1.json diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice2.json diff --git a/src/tests/ofc25/data/slice/post_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice2.json diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice2.json diff --git a/src/tests/ofc25/data/target-full-ietf-slice.json b/src/tests/ofc25-camara-e2e-controller/data/target-full-ietf-slice.json similarity index 100% rename from src/tests/ofc25/data/target-full-ietf-slice.json rename to src/tests/ofc25-camara-e2e-controller/data/target-full-ietf-slice.json diff --git a/src/tests/ofc25/data/target-ietf-slice-posted-slices.json b/src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-posted-slices.json similarity index 100% rename from src/tests/ofc25/data/target-ietf-slice-posted-slices.json rename to src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-posted-slices.json diff --git a/src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json b/src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-put-connection-groups.json similarity index 100% rename from src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json rename to src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-put-connection-groups.json diff --git a/src/tests/ofc25/data/target-nce-app-flows.json b/src/tests/ofc25-camara-e2e-controller/data/target-nce-app-flows.json similarity index 100% rename from src/tests/ofc25/data/target-nce-app-flows.json rename to src/tests/ofc25-camara-e2e-controller/data/target-nce-app-flows.json diff --git a/src/tests/ofc25/data/target-nce-apps.json b/src/tests/ofc25-camara-e2e-controller/data/target-nce-apps.json similarity index 100% rename from src/tests/ofc25/data/target-nce-apps.json rename to src/tests/ofc25-camara-e2e-controller/data/target-nce-apps.json diff --git a/src/tests/ofc25/deploy_specs.sh b/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh similarity index 100% rename from src/tests/ofc25/deploy_specs.sh rename to src/tests/ofc25-camara-e2e-controller/deploy_specs.sh diff --git a/src/tests/ofc25/redeploy-tfs.sh b/src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh similarity index 90% rename from src/tests/ofc25/redeploy-tfs.sh rename to src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh index a82dcbf258e0e7aeb05ce7a1bb711512c7b682ad..d030596d707c5f49c14bc0f43a654bda3159b688 100755 --- a/src/tests/ofc25/redeploy-tfs.sh +++ b/src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh ./deploy/all.sh diff --git a/src/tests/ofc25/requirements.in b/src/tests/ofc25-camara-e2e-controller/requirements.in similarity index 100% rename from src/tests/ofc25/requirements.in rename to src/tests/ofc25-camara-e2e-controller/requirements.in diff --git a/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh b/src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh similarity index 89% rename from src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh rename to src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh index 8996bfecd03bd1db584420bbed95992fb740c6b2..6c41a85db2d5363971531c814283edbf3ebc0d62 100755 --- a/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh +++ b/src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh @@ -17,4 +17,4 @@ source /var/teraflow/tfs_runtime_env_vars.sh export PYTHONPATH=/var/teraflow pytest --verbose --log-level=INFO \ --junitxml=/opt/results/report_e2e_ietf_slice_operations.xml \ - /var/teraflow/tests/ofc25/tests/test_e2e_ietf_slice_operations.py + /var/teraflow/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py diff --git a/src/tests/ofc25/scripts/run-onboarding.sh b/src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh similarity index 91% rename from src/tests/ofc25/scripts/run-onboarding.sh rename to src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh index 689de9c5a4079b9ce2b612ee596d3a7c770dc10c..397d98d4b4db7952b2b879dcd1977c1a43cc30a2 100755 --- a/src/tests/ofc25/scripts/run-onboarding.sh +++ b/src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh @@ -17,4 +17,4 @@ source /var/teraflow/tfs_runtime_env_vars.sh export PYTHONPATH=/var/teraflow pytest --verbose --log-level=INFO \ --junitxml=/opt/results/report_onboarding.xml \ - /var/teraflow/tests/ofc25/tests/test_onboarding.py + /var/teraflow/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py diff --git a/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py b/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..15978851faae668339fa4eed6db8ab7e1be2eb5e --- /dev/null +++ b/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py @@ -0,0 +1,43 @@ +# 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. + +import pytest +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from service.client.ServiceClient import ServiceClient + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def monitoring_client(): + _client = MonitoringClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient() + yield _client + _client.close() diff --git a/src/tests/ofc25/tests/Tools.py b/src/tests/ofc25-camara-e2e-controller/tests/Tools.py similarity index 100% rename from src/tests/ofc25/tests/Tools.py rename to src/tests/ofc25-camara-e2e-controller/tests/Tools.py diff --git a/src/tests/ofc25/tests/__init__.py b/src/tests/ofc25-camara-e2e-controller/tests/__init__.py similarity index 100% rename from src/tests/ofc25/tests/__init__.py rename to src/tests/ofc25-camara-e2e-controller/tests/__init__.py diff --git a/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py b/src/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py similarity index 100% rename from src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py rename to src/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py diff --git a/src/tests/ofc25/tests/test_onboarding.py b/src/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py similarity index 100% rename from src/tests/ofc25/tests/test_onboarding.py rename to src/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py