call('proxy.create', [ [ 'name' => 'Audit proxy', 'operating_mode' => PROXY_OPERATING_MODE_ACTIVE, 'description' => 'Proxy audit description', 'tls_accept' => 2, 'allowed_addresses' => 'localhost', 'tls_psk_identity' => 'Audit', 'tls_psk' => '11111595725ac58dd977beef14b97461a7c1045b9a1c923453302c5473193478' ] ]); self::$resourceid = $create['result']['proxyids'][0]; $created = json_encode([ 'proxy.name' => ['add', 'Audit proxy'], 'proxy.description' => ['add', 'Proxy audit description'], 'proxy.tls_accept' => ['add', '2'], 'proxy.allowed_addresses' => ['add', 'localhost'], 'proxy.tls_psk_identity' => ['add', '******'], 'proxy.tls_psk' => ['add', '******'], 'proxy.proxyid' => ['add', self::$resourceid] ]); $this->getAuditDetails('details', $this->add_actionid, $created, self::$resourceid); } public function testAuditlogProxy_Update() { $updated = json_encode([ 'proxy.name' => ['update', 'Updated Audit proxy', 'API active proxy for discovery action'], 'proxy.description' => ['update', 'Update proxy audit description', ''], 'proxy.tls_accept' => ['update', '2', '1'], 'proxy.allowed_addresses' => ['update', 'updated_address', ''], 'proxy.tls_psk_identity' => ['update', '******', '******'], 'proxy.tls_psk' => ['update', '******', '******'] ]); $this->call('proxy.update', [ [ 'proxyid' => self::PROXYID, 'name' => 'Updated Audit proxy', 'operating_mode' => PROXY_OPERATING_MODE_ACTIVE, 'description' => 'Update proxy audit description', 'tls_accept' => 2, 'allowed_addresses' => 'updated_address', 'tls_psk_identity' => 'Updated_TSK', 'tls_psk' => '11111595725ac58dd977beef14b97461a7c1045b9a1c923453302c5473193111' ] ]); $this->getAuditDetails('details', $this->update_actionid, $updated, self::PROXYID); } /** * @depends testAuditlogProxy_Create */ public function testAuditlogProxy_Delete() { $this->call('proxy.delete', [self::$resourceid]); $this->getAuditDetails('resourcename', $this->delete_actionid, 'Audit proxy', self::$resourceid); } }