This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for fast check if transformation works
- Loading branch information
1 parent
2f02f7c
commit a4916a8
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |