| @@ 71-88 (lines=18) @@ | ||
| 68 | $this->service->addBeforeHook('auth', $bearerAuthentication); |
|
| 69 | } |
|
| 70 | ||
| 71 | public function testConnect() |
|
| 72 | { |
|
| 73 | $this->assertTrue( |
|
| 74 | $this->makeRequest( |
|
| 75 | ['vpn-server-node', 'aabbcc'], |
|
| 76 | 'POST', |
|
| 77 | 'connect', |
|
| 78 | [], |
|
| 79 | [ |
|
| 80 | 'profile_id' => 'internet', |
|
| 81 | 'common_name' => '12345678901234567890123456789012', |
|
| 82 | 'ip4' => '10.10.10.10', |
|
| 83 | 'ip6' => 'fd00:4242:4242:4242::', |
|
| 84 | 'connected_at' => 12345678, |
|
| 85 | ] |
|
| 86 | ) |
|
| 87 | ); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testConnectInAcl() |
|
| 91 | { |
|
| @@ 90-107 (lines=18) @@ | ||
| 87 | ); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testConnectInAcl() |
|
| 91 | { |
|
| 92 | $this->assertTrue( |
|
| 93 | $this->makeRequest( |
|
| 94 | ['vpn-server-node', 'aabbcc'], |
|
| 95 | 'POST', |
|
| 96 | 'connect', |
|
| 97 | [], |
|
| 98 | [ |
|
| 99 | 'profile_id' => 'acl', |
|
| 100 | 'common_name' => '12345678901234567890123456789012', |
|
| 101 | 'ip4' => '10.10.10.10', |
|
| 102 | 'ip6' => 'fd00:4242:4242:4242::', |
|
| 103 | 'connected_at' => 12345678, |
|
| 104 | ] |
|
| 105 | ) |
|
| 106 | ); |
|
| 107 | } |
|
| 108 | ||
| 109 | public function testConnectNotInAcl() |
|
| 110 | { |
|