mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Renamed portfolio to portwebui
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Unit Tests
|
||||
|
||||
This directory contains unit tests for various custom components in the project, such as the custom lookup plugin `docker_cards` used in the `web-app-portfolio` role.
|
||||
This directory contains unit tests for various custom components in the project, such as the custom lookup plugin `docker_cards` used in the `web-app-port-ui` role.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -31,7 +31,7 @@ You can run the tests using one of the following methods:
|
||||
## How It Works
|
||||
|
||||
- **Setup:**
|
||||
The test script creates a temporary directory to simulate your roles folder. It then creates a sample role (`web-app-portfolio`) with a `README.md` file (containing a header for the title) and a `meta/main.yml` file (with the required metadata).
|
||||
The test script creates a temporary directory to simulate your roles folder. It then creates a sample role (`web-app-port-ui`) with a `README.md` file (containing a header for the title) and a `meta/main.yml` file (with the required metadata).
|
||||
|
||||
- **Execution:**
|
||||
Dummy variable values for `domains` and `applications` are provided (these are the variables the lookup plugin expects). The lookup plugin is then run, which processes the sample role and returns the card information.
|
||||
|
@@ -22,7 +22,7 @@ class TestApplicationsIfGroupAndDeps(unittest.TestCase):
|
||||
'web-svc-legal': {},
|
||||
'web-svc-file': {},
|
||||
'web-svc-asset': {},
|
||||
'web-app-portfolio': {},
|
||||
'web-app-port-ui': {},
|
||||
'util-srv-corporate-identity': {},
|
||||
}
|
||||
|
||||
|
@@ -4,8 +4,8 @@ import tempfile
|
||||
import shutil
|
||||
import unittest
|
||||
|
||||
# Adjust the PYTHONPATH to include the lookup_plugins folder from the web-app-portfolio role.
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../../roles/web-app-portfolio/lookup_plugins'))
|
||||
# Adjust the PYTHONPATH to include the lookup_plugins folder from the web-app-port-ui role.
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../../roles/web-app-port-ui/lookup_plugins'))
|
||||
|
||||
from docker_cards import LookupModule
|
||||
|
||||
@@ -13,8 +13,8 @@ class TestDockerCardsLookup(unittest.TestCase):
|
||||
def setUp(self):
|
||||
# Create a temporary directory to simulate the roles directory.
|
||||
self.test_roles_dir = tempfile.mkdtemp(prefix="test_roles_")
|
||||
# Create a sample role "web-app-portfolio".
|
||||
self.role_name = "web-app-portfolio"
|
||||
# Create a sample role "web-app-port-ui".
|
||||
self.role_name = "web-app-port-ui"
|
||||
self.role_dir = os.path.join(self.test_roles_dir, self.role_name)
|
||||
os.makedirs(os.path.join(self.role_dir, "meta"))
|
||||
|
||||
|
Reference in New Issue
Block a user