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