STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_generate_dhcp_config Namespace Reference

Functions

 board (ip, mac, board_id=None)
 cfg (**boards)
 test_recovery_address_matches_firmware_and_ota_tool ()
 test_two_boards_sharing_a_recovery_address_are_refused ()
 test_board_id_must_match_its_address ()
 test_interface_is_the_one_on_the_board_subnet ()
 test_hosts_only_writes_just_the_reservations (Path tmp_path)
 test_a_refused_config_leaves_the_served_list_alone (Path tmp_path)

Variables

 SUBNET = ipaddress.ip_network("192.168.2.0/24")
str IP_ADDR
str CONFIG

Detailed Description

generate_dhcp_config.py: what star-dhcp-sync runs as root on every config save.

Run: python3 -m pytest daq-server/deploy/dhcp -q

Function Documentation

◆ board()

test_generate_dhcp_config.board ( ip,
mac,
board_id = None )

◆ cfg()

test_generate_dhcp_config.cfg ( ** boards)

◆ test_a_refused_config_leaves_the_served_list_alone()

test_generate_dhcp_config.test_a_refused_config_leaves_the_served_list_alone ( Path tmp_path)

Definition at line 81 of file test_generate_dhcp_config.py.

◆ test_board_id_must_match_its_address()

test_generate_dhcp_config.test_board_id_must_match_its_address ( )

Definition at line 42 of file test_generate_dhcp_config.py.

References board(), and cfg().

◆ test_hosts_only_writes_just_the_reservations()

test_generate_dhcp_config.test_hosts_only_writes_just_the_reservations ( Path tmp_path)

Definition at line 72 of file test_generate_dhcp_config.py.

◆ test_interface_is_the_one_on_the_board_subnet()

test_generate_dhcp_config.test_interface_is_the_one_on_the_board_subnet ( )

Definition at line 58 of file test_generate_dhcp_config.py.

◆ test_recovery_address_matches_firmware_and_ota_tool()

test_generate_dhcp_config.test_recovery_address_matches_firmware_and_ota_tool ( )

Definition at line 26 of file test_generate_dhcp_config.py.

◆ test_two_boards_sharing_a_recovery_address_are_refused()

test_generate_dhcp_config.test_two_boards_sharing_a_recovery_address_are_refused ( )

Definition at line 34 of file test_generate_dhcp_config.py.

References board(), and cfg().

Variable Documentation

◆ CONFIG

str test_generate_dhcp_config.CONFIG
Initial value:
1= """
2[boards.rtd_board]
3ip = "192.168.2.31"
4board_id = 31
5mac = "4a:27:e2:3a:ad:71"
6"""

Definition at line 64 of file test_generate_dhcp_config.py.

◆ IP_ADDR

str test_generate_dhcp_config.IP_ADDR
Initial value:
1= """\
21: lo inet 127.0.0.1/8 scope host lo\\ valid_lft forever preferred_lft forever
32: enp4s0 inet 192.168.2.20/24 brd 192.168.2.255 scope global enp4s0\\ valid_lft forever
42: enp4s0 inet 169.254.0.20/16 scope global enp4s0\\ valid_lft forever
53: wlx0cef15768c39 inet 10.0.0.5/24 brd 10.0.0.255 scope global dynamic wlx0cef15768c39
6"""

Definition at line 50 of file test_generate_dhcp_config.py.

◆ SUBNET

test_generate_dhcp_config.SUBNET = ipaddress.ip_network("192.168.2.0/24")

Definition at line 12 of file test_generate_dhcp_config.py.