Skip to content

Commit 1c90611

Browse files
tests: adjust WireGuardSettings tests to work with new Service structure
1 parent 4cc8874 commit 1c90611

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ class APIModelsWireGuardSettingsTestCase extends TestCase {
1919
# Enable WireGuard and ensure the service is running
2020
$wg = new WireGuardSettings(enable: true, async: false);
2121
$wg->update(apply: true);
22-
$this->assert_is_true(Service::query(name: 'wireguard', status: true)->exists());
22+
$this->assert_is_true(is_service_running('wireguard'));
2323

2424
# Disable WireGuard and ensure the service is stopped
2525
$wg->enable->value = false;
2626
$wg->update(apply: true);
27-
$this->assert_is_true(Service::query(name: 'wireguard', status: false)->exists());
27+
$this->assert_is_false(is_service_running('wireguard'));
2828
}
2929

3030
/**

0 commit comments

Comments
 (0)