Skip to content

Commit 8289e30

Browse files
tests: correct usage of DHCPRelay and DHCPServer tests
1 parent dde6702 commit 8289e30

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPRelayTestCase.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class APIModelsDHCPRelayTestCase extends TestCase {
3232
# Ensure we can enable the DHCPRelay
3333
$this->assert_does_not_throw(
3434
callable: function () {
35-
$dhcp_relay = new DHCPRelay(enable: true);
35+
$dhcp_relay = new DHCPRelay(enable: true, server: ["1.2.3.4"]);
3636
$dhcp_relay->update();
3737
},
3838
);

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDHCPServerTestCase.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class APIModelsDHCPServerTestCase extends TestCase {
4343
$dhcp_server = new DHCPServer(id: 'lan', async: false);
4444

4545
# Temporarily change the `lan` interface to use dhcp IPv4
46-
Model::set_config('dhcrelay/0/interface', 'lan');
46+
Model::set_config('dhcrelay/interface', 'lan');
4747

4848
# Try to enable the DHCP server
4949
$dhcp_server->validate_enable(enable: true);

0 commit comments

Comments
 (0)