#2258: added NTPClient to system software + testing all installable software on client1 in config
This commit is contained in:
@@ -2,6 +2,7 @@ from primaite.simulator.network.hardware.base import NIC, Node
|
||||
from primaite.simulator.system.applications.web_browser import WebBrowser
|
||||
from primaite.simulator.system.services.dns.dns_client import DNSClient
|
||||
from primaite.simulator.system.services.ftp.ftp_client import FTPClient
|
||||
from primaite.simulator.system.services.ntp.ntp_client import NTPClient
|
||||
|
||||
|
||||
class Computer(Node):
|
||||
@@ -49,6 +50,9 @@ class Computer(Node):
|
||||
# FTP
|
||||
self.software_manager.install(FTPClient)
|
||||
|
||||
# NTP
|
||||
self.software_manager.install(NTPClient)
|
||||
|
||||
# Web Browser
|
||||
self.software_manager.install(WebBrowser)
|
||||
|
||||
|
||||
@@ -89,9 +89,25 @@ simulation:
|
||||
payload: "DELETE"
|
||||
server_ip: 192.168.1.14
|
||||
services:
|
||||
- ref: client_1_dns_client
|
||||
type: DNSClient
|
||||
|
||||
- ref: client_1_dns_server
|
||||
type: DNSServer
|
||||
options:
|
||||
domain_mapping:
|
||||
arcd.com: 192.168.1.12 # web server
|
||||
- ref: client_1_database_client
|
||||
type: DatabaseClient
|
||||
options:
|
||||
db_server_ip: 192.168.10.21
|
||||
- ref: client_1_database_service
|
||||
type: DatabaseService
|
||||
options:
|
||||
backup_server_ip: 192.168.10.21
|
||||
- ref: client_1_web_service
|
||||
type: WebServer
|
||||
- ref: client_1_ftp_server
|
||||
type: FTPServer
|
||||
- ref: client_1_ntp_server
|
||||
type: NTPServer
|
||||
- ref: client_2
|
||||
type: computer
|
||||
hostname: client_2
|
||||
|
||||
@@ -12,6 +12,7 @@ from primaite.simulator.network.hardware.nodes.computer import Computer
|
||||
from primaite.simulator.system.applications.web_browser import WebBrowser
|
||||
from primaite.simulator.system.services.dns.dns_client import DNSClient
|
||||
from primaite.simulator.system.services.ftp.ftp_client import FTPClient
|
||||
from primaite.simulator.system.services.ntp.ntp_client import NTPClient
|
||||
from tests import TEST_ASSETS_ROOT
|
||||
|
||||
BASIC_CONFIG = TEST_ASSETS_ROOT / "configs/basic_switched_network.yaml"
|
||||
@@ -58,7 +59,7 @@ def test_node_software_install():
|
||||
client_1: Computer = game.simulation.network.get_node_by_hostname("client_1")
|
||||
client_2: Computer = game.simulation.network.get_node_by_hostname("client_2")
|
||||
|
||||
system_software = {DNSClient, FTPClient, WebBrowser}
|
||||
system_software = {DNSClient, FTPClient, NTPClient, WebBrowser}
|
||||
|
||||
# check that system software is installed on client 1
|
||||
for software in system_software:
|
||||
@@ -73,5 +74,5 @@ def test_node_software_install():
|
||||
assert client_1.software_manager.software.get(applications) is not None
|
||||
|
||||
# check that services have been installed on client 1
|
||||
# for service in SERVICE_TYPES_MAPPING:
|
||||
# assert client_1.software_manager.software.get(service) is not None
|
||||
for service in SERVICE_TYPES_MAPPING:
|
||||
assert client_1.software_manager.software.get(service) is not None
|
||||
|
||||
Reference in New Issue
Block a user