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 - service config 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:\tups\tpolicies\policies\ups_01033000_01032001.rsc
|
sl@0
|
26 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
|
sl@0
|
27 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
|
sl@0
|
28 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01036000_01036001.rsc
|
sl@0
|
29 |
RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies\
|
sl@0
|
30 |
|
sl@0
|
31 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0001
|
sl@0
|
32 |
//! @SYMTestCaseDesc No policy files.
|
sl@0
|
33 |
//! @SYMTestPriority High
|
sl@0
|
34 |
//! @SYMTestActions Attempt to load a the service configuration data from a directory with no policy files.
|
sl@0
|
35 |
//! @SYMTestExpectedResults An empty set of configuration objects is returned.
|
sl@0
|
36 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
37 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0001
|
sl@0
|
38 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini nopolicies
|
sl@0
|
39 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0001
|
sl@0
|
40 |
|
sl@0
|
41 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0002
|
sl@0
|
42 |
//! @SYMTestCaseDesc Ignore invalid policy filenames
|
sl@0
|
43 |
//! @SYMTestPriority High
|
sl@0
|
44 |
//! @SYMTestActions Load service configuration settings for system server 01032000
|
sl@0
|
45 |
//! @SYMTestExpectedResults A single service is configured. Similar but invalid policy filenames are ignored.
|
sl@0
|
46 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
47 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0002
|
sl@0
|
48 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini oneservice
|
sl@0
|
49 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0002
|
sl@0
|
50 |
|
sl@0
|
51 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0003
|
sl@0
|
52 |
//! @SYMTestCaseDesc Load service config for the fake messaging server.
|
sl@0
|
53 |
//! @SYMTestPriority High
|
sl@0
|
54 |
//! @SYMTestActions Attempt to load service configuration for server 0x10310000
|
sl@0
|
55 |
//! @SYMTestExpectedResults Two service config objects are created.
|
sl@0
|
56 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
57 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0003
|
sl@0
|
58 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini twoservices
|
sl@0
|
59 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0003
|
sl@0
|
60 |
|
sl@0
|
61 |
// Setup policy files on the system drive
|
sl@0
|
62 |
RUN_UTILS MKDIR c:\tups\
|
sl@0
|
63 |
RUN_UTILS MKDIR c:\tups\tpolicies\
|
sl@0
|
64 |
RUN_UTILS MKDIR c:\tups\tpolicies\policies\
|
sl@0
|
65 |
RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01033000_01032001.rsc c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
|
sl@0
|
66 |
RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01034000_01032001.rsc c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
|
sl@0
|
67 |
RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01035000_01035001.rsc c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
|
sl@0
|
68 |
|
sl@0
|
69 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0004
|
sl@0
|
70 |
//! @SYMTestCaseDesc Policy file on the Z drive is eclipsed a policy file on the system drive.
|
sl@0
|
71 |
//! @SYMTestPriority High
|
sl@0
|
72 |
//! @SYMTestActions Load service config
|
sl@0
|
73 |
//! @SYMTestExpectedResults Make sure the configuration is read from the UPS policy file on the system drive.
|
sl@0
|
74 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
75 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0004
|
sl@0
|
76 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini eclipsevalid
|
sl@0
|
77 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0004
|
sl@0
|
78 |
|
sl@0
|
79 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0005
|
sl@0
|
80 |
//! @SYMTestCaseDesc Policy file only exists on the system drive.
|
sl@0
|
81 |
//! @SYMTestPriority High
|
sl@0
|
82 |
//! @SYMTestActions Load service config
|
sl@0
|
83 |
//! @SYMTestExpectedResults Service config should be read correctly.
|
sl@0
|
84 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
85 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0005
|
sl@0
|
86 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini systemdrive
|
sl@0
|
87 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0005
|
sl@0
|
88 |
|
sl@0
|
89 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0006
|
sl@0
|
90 |
//! @SYMTestCaseDesc Ignore corrupt policies on system drive.
|
sl@0
|
91 |
//! @SYMTestPriority High
|
sl@0
|
92 |
//! @SYMTestActions Load service config.
|
sl@0
|
93 |
//! @SYMTestExpectedResults Corrupt policy file on system drive should be ignored.
|
sl@0
|
94 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
95 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0006
|
sl@0
|
96 |
RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini eclipseinvalid
|
sl@0
|
97 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0006
|
sl@0
|
98 |
|
sl@0
|
99 |
//! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0007
|
sl@0
|
100 |
//! @SYMTestCaseDesc Corrupt policies on the Z drive should panic the UPS
|
sl@0
|
101 |
//! @SYMTestPriority High
|
sl@0
|
102 |
//! @SYMTestActions Load service config for a corrupt policy that only exists on the Z drive.
|
sl@0
|
103 |
//! @SYMTestExpectedResults UPS should panic.
|
sl@0
|
104 |
//! @SYMDevelopedForRelease Oghma
|
sl@0
|
105 |
START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0007
|
sl@0
|
106 |
RUN_PANIC_STEP_RESULT 0 UPS-Policies 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini panic0
|
sl@0
|
107 |
END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0007
|
sl@0
|
108 |
|
sl@0
|
109 |
// Cleanup
|
sl@0
|
110 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
|
sl@0
|
111 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
|
sl@0
|
112 |
RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
|
sl@0
|
113 |
RUN_UTILS DELETEFILE c:\upsrefnotifier.txt
|