sl@0: // sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: LOAD_SUITE tupspolicies sl@0: PRINT ---------------------------------------------------------- sl@0: PRINT tupspolicies: sl@0: PRINT User Prompt Service policy library - service config unit test sl@0: PRINT ------------------------------------------------------------ sl@0: sl@0: // Clean environment. Policy directory on system drive must not exist for the first tests sl@0: // to allow us to check that the library works if the path doesn't exist. sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01033000_01032001.rsc sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01036000_01036001.rsc sl@0: RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies\ sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0001 sl@0: //! @SYMTestCaseDesc No policy files. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Attempt to load a the service configuration data from a directory with no policy files. sl@0: //! @SYMTestExpectedResults An empty set of configuration objects is returned. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0001 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini nopolicies sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0001 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0002 sl@0: //! @SYMTestCaseDesc Ignore invalid policy filenames sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Load service configuration settings for system server 01032000 sl@0: //! @SYMTestExpectedResults A single service is configured. Similar but invalid policy filenames are ignored. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0002 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini oneservice sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0002 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0003 sl@0: //! @SYMTestCaseDesc Load service config for the fake messaging server. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Attempt to load service configuration for server 0x10310000 sl@0: //! @SYMTestExpectedResults Two service config objects are created. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0003 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini twoservices sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0003 sl@0: sl@0: // Setup policy files on the system drive sl@0: RUN_UTILS MKDIR c:\tups\ sl@0: RUN_UTILS MKDIR c:\tups\tpolicies\ sl@0: RUN_UTILS MKDIR c:\tups\tpolicies\policies\ sl@0: RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01033000_01032001.rsc c:\tups\tpolicies\policies\ups_01033000_01032001.rsc sl@0: RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01034000_01032001.rsc c:\tups\tpolicies\policies\ups_01034000_01032001.rsc sl@0: RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01035000_01035001.rsc c:\tups\tpolicies\policies\ups_01035000_01035001.rsc sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0004 sl@0: //! @SYMTestCaseDesc Policy file on the Z drive is eclipsed a policy file on the system drive. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Load service config sl@0: //! @SYMTestExpectedResults Make sure the configuration is read from the UPS policy file on the system drive. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0004 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini eclipsevalid sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0004 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0005 sl@0: //! @SYMTestCaseDesc Policy file only exists on the system drive. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Load service config sl@0: //! @SYMTestExpectedResults Service config should be read correctly. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0005 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini systemdrive sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0005 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0006 sl@0: //! @SYMTestCaseDesc Ignore corrupt policies on system drive. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Load service config. sl@0: //! @SYMTestExpectedResults Corrupt policy file on system drive should be ignored. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0006 sl@0: RUN_TEST_STEP 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini eclipseinvalid sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0006 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-SERVICECONFIG-0007 sl@0: //! @SYMTestCaseDesc Corrupt policies on the Z drive should panic the UPS sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Load service config for a corrupt policy that only exists on the Z drive. sl@0: //! @SYMTestExpectedResults UPS should panic. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0007 sl@0: RUN_PANIC_STEP_RESULT 0 UPS-Policies 100 tupspolicies serviceconfig z:\tups\tpolicies\scripts\tserviceconfig.ini panic0 sl@0: END_TESTCASE SEC-UPS-POLICIES-SERVICECONFIG-0007 sl@0: sl@0: // Cleanup sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01033000_01032001.rsc sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc sl@0: RUN_UTILS DELETEFILE c:\upsrefnotifier.txt