os/security/authorisation/userpromptservice/policies/test/tupspolicies/scripts/tpolicycache.script
First public contribution.
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
3 // All rights reserved.
4 // This component and the accompanying materials are made available
5 // under the terms of the License "Eclipse Public License v1.0"
6 // which accompanies this distribution, and is available
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
17 LOAD_SUITE tupspolicies
18 PRINT ----------------------------------------------------------
20 PRINT User Prompt Service policy library unit test
21 PRINT ----------------------------------------------------------
23 // Clean environment. Policy directory on system drive must not exist for the first tests
24 // to allow us to check that the library works if the path doesn't exist.
25 RUN_UTILS DELETEFILE c:\upsrefnotifier.txt
26 RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies
28 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0001
29 //! @SYMTestCaseDesc Test policy matching algorithm within a single policy file.
30 //! @SYMTestPriority High
31 //! @SYMTestActions Matches a set of requests against policies in a single policy file.
32 //! @SYMTestExpectedResults Every request should match the expected policy (identified by the flags field).
33 //! @SYMDevelopedForRelease Oghma
34 START_TESTCASE SEC-UPS-POLICIES-CACHE-0001
35 RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policymatch.ini
36 END_TESTCASE SEC-UPS-POLICIES-CACHE-0001
38 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0002
39 //! @SYMTestCaseDesc Eclipsing test
40 //! @SYMTestPriority High
41 //! @SYMTestActions Eclipse various policy files on the Z drive with policy files on the system drive
42 //! @SYMTestExpectedResults Policy files should be loaded from the system drive
43 //! instead of the Z drive unless the policy file on the system drive is corrupt.
44 //! @SYMDevelopedForRelease Oghma
45 START_TESTCASE SEC-UPS-POLICIES-CACHE-0002
46 // Copy policy files to system drive.
47 RUN_UTILS MKDIR c:\tups\
48 RUN_UTILS MKDIR c:\tups\tpolicies\
49 RUN_UTILS MKDIR c:\tups\tpolicies\policies\
50 RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01033000_01032001.rsc c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
51 RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01034000_01032001.rsc c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
52 RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01035000_01035001.rsc c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
54 RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyeclipse.ini
57 RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
58 RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
59 RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
60 END_TESTCASE SEC-UPS-POLICIES-CACHE-0002
63 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0003
64 //! @SYMTestCaseDesc Error handling.
65 //! @SYMTestPriority Medium
66 //! @SYMTestActions Test a variety of error conditions e.g. missing policy files.
67 //! @SYMTestExpectedResults Every request returns the expected error code.
68 //! @SYMDevelopedForRelease Oghma
69 START_TESTCASE SEC-UPS-POLICIES-CACHE-0003
70 RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyerrors.ini
71 END_TESTCASE SEC-UPS-POLICIES-CACHE-0003
73 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0004
74 //! @SYMTestCaseDesc Corrupt policy files on Z drive should panic UPS
75 //! @SYMTestPriority Medium
76 //! @SYMTestActions Try to load a corrupt policy file from the Z drive.
77 //! @SYMTestExpectedResults The UPS should panic with the expected panic code.
78 //! @SYMDevelopedForRelease Oghma
79 START_TESTCASE SEC-UPS-POLICIES-CACHE-0004
80 RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini
81 END_TESTCASE SEC-UPS-POLICIES-CACHE-0004
83 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0005
84 //! @SYMTestCaseDesc Policy file system drive & Z drive is corrupt.
85 //! @SYMTestPriority Medium
86 //! @SYMTestActions Try to load a corrupt policy file from the Z drive, system drive file is also corrupt.
87 //! @SYMTestExpectedResults The UPS should panic with the expected panic code.
88 //! @SYMDevelopedForRelease Oghma
89 START_TESTCASE SEC-UPS-POLICIES-CACHE-0005
90 RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01036000_01036001.rsc c:\tups\tpolicies\policies\ups_01036000_01036001.rsc
92 RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini
94 RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01036000_01036001.rsc
95 END_TESTCASE SEC-UPS-POLICIES-CACHE-0005
97 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0006
98 //! @SYMTestCaseDesc Tests the plug-in manager.
99 //! @SYMTestPriority High
100 //! @SYMTestActions Creates and destroys plug-in implementations.
101 //! @SYMTestExpectedResults ECOM final close should not panic.
102 //! @SYMDevelopedForRelease Oghma
103 START_TESTCASE SEC-UPS-POLICIES-CACHE-0006
104 RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestPluginManagerL z:\tups\tpolicies\scripts\pluginmanager.ini
105 END_TESTCASE SEC-UPS-POLICIES-CACHE-0006
107 //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0007
108 //! @SYMTestCaseDesc Test length constrains for CClientEntity and CFingerprint
109 //! @SYMTestPriority Medium
110 //! @SYMTestActions Creats fingerprints and client entities with different lengths values.
111 //! @SYMTestExpectedResults Constructors error if length constraints are broken.
112 //! @SYMDevelopedForRelease Oghma
113 START_TESTCASE SEC-UPS-POLICIES-CACHE-0007
114 RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestLengthsL
115 END_TESTCASE SEC-UPS-POLICIES-CACHE-0007
117 // Cleanup automated notifier response
118 RUN_UTILS DELETEFILE c:\upsrefnotifier.txt
119 RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies