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 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:\upsrefnotifier.txt sl@0: RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0001 sl@0: //! @SYMTestCaseDesc Test policy matching algorithm within a single policy file. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Matches a set of requests against policies in a single policy file. sl@0: //! @SYMTestExpectedResults Every request should match the expected policy (identified by the flags field). sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0001 sl@0: RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policymatch.ini sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0001 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0002 sl@0: //! @SYMTestCaseDesc Eclipsing test sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Eclipse various policy files on the Z drive with policy files on the system drive sl@0: //! @SYMTestExpectedResults Policy files should be loaded from the system drive sl@0: //! instead of the Z drive unless the policy file on the system drive is corrupt. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0002 sl@0: // Copy policy files to 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: RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyeclipse.ini 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: END_TESTCASE SEC-UPS-POLICIES-CACHE-0002 sl@0: sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0003 sl@0: //! @SYMTestCaseDesc Error handling. sl@0: //! @SYMTestPriority Medium sl@0: //! @SYMTestActions Test a variety of error conditions e.g. missing policy files. sl@0: //! @SYMTestExpectedResults Every request returns the expected error code. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0003 sl@0: RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyerrors.ini sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0003 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0004 sl@0: //! @SYMTestCaseDesc Corrupt policy files on Z drive should panic UPS sl@0: //! @SYMTestPriority Medium sl@0: //! @SYMTestActions Try to load a corrupt policy file from the Z drive. sl@0: //! @SYMTestExpectedResults The UPS should panic with the expected panic code. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0004 sl@0: RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0004 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0005 sl@0: //! @SYMTestCaseDesc Policy file system drive & Z drive is corrupt. sl@0: //! @SYMTestPriority Medium sl@0: //! @SYMTestActions Try to load a corrupt policy file from the Z drive, system drive file is also corrupt. sl@0: //! @SYMTestExpectedResults The UPS should panic with the expected panic code. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0005 sl@0: RUN_UTILS COPYFILE z:\tups\tpolicies\eclipse\ups_01036000_01036001.rsc c:\tups\tpolicies\policies\ups_01036000_01036001.rsc sl@0: sl@0: RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini sl@0: sl@0: RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01036000_01036001.rsc sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0005 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0006 sl@0: //! @SYMTestCaseDesc Tests the plug-in manager. sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions Creates and destroys plug-in implementations. sl@0: //! @SYMTestExpectedResults ECOM final close should not panic. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0006 sl@0: RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestPluginManagerL z:\tups\tpolicies\scripts\pluginmanager.ini sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0006 sl@0: sl@0: //! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0007 sl@0: //! @SYMTestCaseDesc Test length constrains for CClientEntity and CFingerprint sl@0: //! @SYMTestPriority Medium sl@0: //! @SYMTestActions Creats fingerprints and client entities with different lengths values. sl@0: //! @SYMTestExpectedResults Constructors error if length constraints are broken. sl@0: //! @SYMDevelopedForRelease Oghma sl@0: START_TESTCASE SEC-UPS-POLICIES-CACHE-0007 sl@0: RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestLengthsL sl@0: END_TESTCASE SEC-UPS-POLICIES-CACHE-0007 sl@0: sl@0: // Cleanup automated notifier response sl@0: RUN_UTILS DELETEFILE c:\upsrefnotifier.txt sl@0: RUN_UTILS DELETEDIRECTORY c:\tups\tpolicies\policies sl@0: