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