Add basic libcynara-agent tests 62/33862/7
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 13 Jan 2015 13:53:47 +0000 (14:53 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 17 Mar 2015 14:49:13 +0000 (15:49 +0100)
commita26a8f273a3146dbb4ae420eb079e4e436bf0f7c
treeaafec8bc544975edcdba655311c8679cb7697914
parent544c17889148b36b2f22eec4cc40656a1d4a4046
Add basic libcynara-agent tests

Add basic tests for libcynara-admin library:
* tcag01_set_agent_type_policy_without_plugin - check if setting
 a policy with policy type provided by not loaded plugin fails;
* tcag02_set_agent_type_policy_with_plugin_loaded - checks if
 setting policy with policy type provided by loaded plugin succeeds;
* tcag03_check_with_no_agent - run cynara check that causes usage
 of plugin needing agent (but agent is not running) and verify
 that check returns DENY;
* tcag04_agent_initialize - check initialization and deinitialization
 og agent;
* tcag05_agent_request_timeout - run agent and register it in cynara
 service, break connection by resetting cynara after timeout;
* tcag06_check_with_unregistered_agent - run cynara check that causes
 usage of plugin needing agent (agent is running but not registered)
 and verify that chack returns DENY;
* tcag07_get_request - run simplest complete agent usage scenario:
    > agent registers in cynara,
    > a check using plugin and agent is done,
    > test acts as agent receiving and verifying request,
    > an ALLOW response is sent to cynara,
    > client receives proper ALLOW answer.

Change-Id: I781e9bb88b8686334acca4f9cf2c13a13bd643d5
src/cynara-tests/CMakeLists.txt
src/cynara-tests/test_cases_agent.cpp [new file with mode: 0644]