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