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