Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Add integration test for fast check if transformation works
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkrajewski committed Mar 7, 2024
1 parent 2f02f7c commit a4916a8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions catalystwan/integration_tests/test_config_migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os
import unittest
from typing import cast

from catalystwan.session import create_manager_session
from catalystwan.workflows.config_migration import collect_ux1_config, transform


class TestConfigMigration(unittest.TestCase):
def setUp(self) -> None:
self.session = create_manager_session(
url=cast(str, os.environ.get("TEST_VMANAGE_URL")),
port=cast(int, int(os.environ.get("TEST_VMANAGE_PORT"))), # type: ignore
username=cast(str, os.environ.get("TEST_VMANAGE_USERNAME")),
password=cast(str, os.environ.get("TEST_VMANAGE_PASSWORD")),
)

def test_config_migration(self):
ux1_config = collect_ux1_config(self.session)
ux2_config = transform(ux1_config)
# push_ux2_config(self.session, ux2_config)
# This section will include the Feature profiles creation
# and pushing the configuration to the vManage
assert ux2_config

def tearDown(self) -> None:
# This section will include the Feature profiles deletion
self.session.close()

0 comments on commit a4916a8

Please sign in to comment.