diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test-invalid-1-action-id.policy | 14 | ||||
-rw-r--r-- | test/test-invalid-2-bogus-any.policy | 14 | ||||
-rw-r--r-- | test/test-invalid-3-bogus-inactive.policy | 14 | ||||
-rw-r--r-- | test/test-invalid-4-bogus-active.policy | 14 | ||||
-rw-r--r-- | test/test-invalid-5-max-depth.policy | 87 | ||||
-rw-r--r-- | test/test-valid-1.policy | 14 | ||||
-rw-r--r-- | test/test-valid-2-annotations.policy | 16 | ||||
-rw-r--r-- | test/test-valid-3-lang.policy | 28 | ||||
-rw-r--r-- | test/test-valid-4-unknown-tags.policy | 20 |
9 files changed, 221 insertions, 0 deletions
diff --git a/test/test-invalid-1-action-id.policy b/test/test-invalid-1-action-id.policy new file mode 100644 index 0000000..102d346 --- /dev/null +++ b/test/test-invalid-1-action-id.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="4org.example"> + <description>foo</description> + <message>bar</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-invalid-2-bogus-any.policy b/test/test-invalid-2-bogus-any.policy new file mode 100644 index 0000000..87b3862 --- /dev/null +++ b/test/test-invalid-2-bogus-any.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>foo</description> + <message>bar</message> + <defaults> + <allow_any>_bogus_</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-invalid-3-bogus-inactive.policy b/test/test-invalid-3-bogus-inactive.policy new file mode 100644 index 0000000..8306a83 --- /dev/null +++ b/test/test-invalid-3-bogus-inactive.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>foo</description> + <message>bar</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>_bogus_</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-invalid-4-bogus-active.policy b/test/test-invalid-4-bogus-active.policy new file mode 100644 index 0000000..1d2bcef --- /dev/null +++ b/test/test-invalid-4-bogus-active.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>foo</description> + <message>bar</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>_bogus_</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-invalid-5-max-depth.policy b/test/test-invalid-5-max-depth.policy new file mode 100644 index 0000000..f6e923d --- /dev/null +++ b/test/test-invalid-5-max-depth.policy @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + <future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + </future> + + <action id="4org.example"> + <description>foo</description> + <message>bar</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-valid-1.policy b/test/test-valid-1.policy new file mode 100644 index 0000000..b89c826 --- /dev/null +++ b/test/test-valid-1.policy @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>example</description> + <message>example</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-valid-2-annotations.policy b/test/test-valid-2-annotations.policy new file mode 100644 index 0000000..06bc95e --- /dev/null +++ b/test/test-valid-2-annotations.policy @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>example 2</description> + <message>message 2</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + <annotate key="the.key1">Some Value 1</annotate> + <annotate key="the.key2">Some Value 2</annotate> + </action> + +</policyconfig> diff --git a/test/test-valid-3-lang.policy b/test/test-valid-3-lang.policy new file mode 100644 index 0000000..e7b7ca5 --- /dev/null +++ b/test/test-valid-3-lang.policy @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>example</description> + <message>message</message> + <description xml:lang="da">example (danish)</description> + <message xml:lang="da">message (danish)</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + + <action id="org.example2"> + <description>example 2</description> + <message>message 2</message> + <description xml:lang="da">example 2 (danish)</description> + <message xml:lang="da">message 2 (danish)</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + </action> + +</policyconfig> diff --git a/test/test-valid-4-unknown-tags.policy b/test/test-valid-4-unknown-tags.policy new file mode 100644 index 0000000..ba18b37 --- /dev/null +++ b/test/test-valid-4-unknown-tags.policy @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<policyconfig> + + <action id="org.example"> + <description>example</description> + <message>example</message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep_always</allow_active> + </defaults> + <future_tag> + <future_tag2/> + <future_tag3> + <future_tag4/> + </future_tag3> + </future_tag> + </action> + +</policyconfig> |