os/security/authorisation/userpromptservice/policies/test/tupspolicies/scripts/tpolicycache.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/authorisation/userpromptservice/policies/test/tupspolicies/scripts/tpolicycache.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,120 @@
     1.4 +//
     1.5 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Eclipse Public License v1.0"
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description: 
    1.18 +//
    1.19 +
    1.20 +LOAD_SUITE tupspolicies
    1.21 +PRINT ----------------------------------------------------------
    1.22 +PRINT tupspolicies: 
    1.23 +PRINT User Prompt Service policy library unit test
    1.24 +PRINT ----------------------------------------------------------
    1.25 +
    1.26 +// Clean environment. Policy directory on system drive must not exist for the first tests
    1.27 +// to allow us to check that the library works if the path doesn't exist.
    1.28 +RUN_UTILS DELETEFILE		c:\upsrefnotifier.txt
    1.29 +RUN_UTILS DELETEDIRECTORY 	c:\tups\tpolicies\policies
    1.30 +
    1.31 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0001
    1.32 +//! @SYMTestCaseDesc Test policy matching algorithm within a single policy file.
    1.33 +//! @SYMTestPriority High
    1.34 +//! @SYMTestActions Matches a set of requests against policies in a single policy file.
    1.35 +//! @SYMTestExpectedResults Every request should match the expected policy (identified by the flags field).
    1.36 +//! @SYMDevelopedForRelease Oghma
    1.37 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0001
    1.38 +RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policymatch.ini
    1.39 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0001
    1.40 +
    1.41 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0002
    1.42 +//! @SYMTestCaseDesc Eclipsing test
    1.43 +//! @SYMTestPriority High
    1.44 +//! @SYMTestActions Eclipse various policy files on the Z drive with policy files on the system drive
    1.45 +//! @SYMTestExpectedResults Policy files should be loaded from the system drive 
    1.46 +//!                         instead of the Z drive unless the policy file on the system drive is corrupt.
    1.47 +//! @SYMDevelopedForRelease Oghma
    1.48 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0002
    1.49 +// Copy policy files to system drive.
    1.50 +RUN_UTILS MKDIR 	c:\tups\
    1.51 +RUN_UTILS MKDIR 	c:\tups\tpolicies\
    1.52 +RUN_UTILS MKDIR 	c:\tups\tpolicies\policies\
    1.53 +RUN_UTILS COPYFILE 	z:\tups\tpolicies\eclipse\ups_01033000_01032001.rsc c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
    1.54 +RUN_UTILS COPYFILE 	z:\tups\tpolicies\eclipse\ups_01034000_01032001.rsc c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
    1.55 +RUN_UTILS COPYFILE 	z:\tups\tpolicies\eclipse\ups_01035000_01035001.rsc c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
    1.56 +
    1.57 +RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyeclipse.ini
    1.58 +
    1.59 +// Cleanup
    1.60 +RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01033000_01032001.rsc
    1.61 +RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01034000_01032001.rsc
    1.62 +RUN_UTILS DELETEFILE c:\tups\tpolicies\policies\ups_01035000_01035001.rsc
    1.63 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0002
    1.64 +
    1.65 +
    1.66 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0003
    1.67 +//! @SYMTestCaseDesc Error handling.
    1.68 +//! @SYMTestPriority Medium
    1.69 +//! @SYMTestActions Test a variety of error conditions e.g. missing policy files.
    1.70 +//! @SYMTestExpectedResults Every request returns the expected error code.
    1.71 +//! @SYMDevelopedForRelease Oghma
    1.72 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0003
    1.73 +RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policyerrors.ini
    1.74 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0003
    1.75 +
    1.76 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0004
    1.77 +//! @SYMTestCaseDesc Corrupt policy files on Z drive should panic UPS
    1.78 +//! @SYMTestPriority Medium
    1.79 +//! @SYMTestActions Try to load a corrupt policy file from the Z drive.
    1.80 +//! @SYMTestExpectedResults The UPS should panic with the expected panic code.
    1.81 +//! @SYMDevelopedForRelease Oghma
    1.82 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0004
    1.83 +RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini
    1.84 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0004
    1.85 +
    1.86 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0005
    1.87 +//! @SYMTestCaseDesc Policy file system drive & Z drive is corrupt.
    1.88 +//! @SYMTestPriority Medium
    1.89 +//! @SYMTestActions Try to load a corrupt policy file from the Z drive, system drive file is also corrupt.
    1.90 +//! @SYMTestExpectedResults The UPS should panic with the expected panic code.
    1.91 +//! @SYMDevelopedForRelease Oghma
    1.92 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0005
    1.93 +RUN_UTILS COPYFILE 	z:\tups\tpolicies\eclipse\ups_01036000_01036001.rsc c:\tups\tpolicies\policies\ups_01036000_01036001.rsc
    1.94 +
    1.95 +RUN_PANIC_STEP_RESULT 0 UPS-Policies tupspolicies TEFUnit.CTestPlugins.TestCacheL z:\tups\tpolicies\scripts\policypanic0.ini
    1.96 +
    1.97 +RUN_UTILS DELETEFILE 		c:\tups\tpolicies\policies\ups_01036000_01036001.rsc
    1.98 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0005
    1.99 +
   1.100 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0006
   1.101 +//! @SYMTestCaseDesc Tests the plug-in manager.
   1.102 +//! @SYMTestPriority High
   1.103 +//! @SYMTestActions Creates and destroys plug-in implementations.
   1.104 +//! @SYMTestExpectedResults ECOM final close should not panic.
   1.105 +//! @SYMDevelopedForRelease Oghma
   1.106 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0006
   1.107 +RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestPluginManagerL z:\tups\tpolicies\scripts\pluginmanager.ini
   1.108 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0006
   1.109 +
   1.110 +//! @SYMTestCaseID SEC-UPS-POLICIES-CACHE-0007
   1.111 +//! @SYMTestCaseDesc Test length constrains for CClientEntity and CFingerprint
   1.112 +//! @SYMTestPriority Medium
   1.113 +//! @SYMTestActions Creats fingerprints and client entities with different lengths values.
   1.114 +//! @SYMTestExpectedResults Constructors error if length constraints are broken.
   1.115 +//! @SYMDevelopedForRelease Oghma
   1.116 +START_TESTCASE SEC-UPS-POLICIES-CACHE-0007
   1.117 +RUN_TEST_STEP_RESULT 0 100 tupspolicies TEFUnit.CTestPlugins.TestLengthsL
   1.118 +END_TESTCASE SEC-UPS-POLICIES-CACHE-0007
   1.119 +
   1.120 +// Cleanup automated notifier response
   1.121 +RUN_UTILS DELETEFILE		c:\upsrefnotifier.txt
   1.122 +RUN_UTILS DELETEDIRECTORY 	c:\tups\tpolicies\policies
   1.123 +