os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/security.script
First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 //! @SYMTestSuiteName PDS-TEF-SQL-SUITE
19 //! @SYMScriptTestEnvironment TEF
20 //! @internalComponent
25 LOAD_SUITE te_SQL_Suite
26 LOAD_SUITE te_SQL_Suite_cap1
27 LOAD_SUITE te_SQL_Suite_cap2
29 RUN_UTILS MkDir c:\private\
30 RUN_UTILS MkDir c:\private\102827c7\
31 RUN_UTILS MkDir c:\private\102827c8\
32 RUN_UTILS MkDir c:\private\10281e17\
34 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec.db
35 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec1.db
36 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec2.db
37 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec4.db
38 RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]sec.db
39 RUN_UTILS DeleteFile c:\private\102827c7\sec.db
40 RUN_UTILS DeleteFile c:\private\102827c8\sec.db
41 RUN_UTILS DeleteFile c:\private\102827c8\sec3.db
42 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec_copy.db
43 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]secpol.db
46 START_TESTCASE SYSLIB-SQL-CIT-1839
47 //! @SYMTestCaseID SYSLIB-SQL-CIT-1839
48 //! @SYMTestCaseDesc PlatSec tests creating databases
49 //! @SYMTestPriority High
50 //! @SYMTestActions See description and the config file.
51 //! @SYMTestExpectedResults
52 //! The test looks for errors and content
53 //! within the database. If these are not seen test errors
54 //! will be generated.
58 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1
59 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1a
60 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1b
61 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini create2
62 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini create3
63 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create4
64 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create5
65 RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create6
66 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create7
67 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create8
68 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create9
69 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create10
70 RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\security.ini create11
71 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create12
72 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create12a
73 RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\security.ini create12b
74 END_TESTCASE SYSLIB-SQL-CIT-1839
76 START_TESTCASE SYSLIB-SQL-CIT-1840
77 //! @SYMTestCaseID SYSLIB-SQL-CIT-1840
78 //! @SYMTestCaseDesc PlatSec tests reading databases
79 //! @SYMTestPriority High
80 //! @SYMTestActions See description and the config file.
81 //! @SYMTestExpectedResults
82 //! The test looks for errors and content
83 //! within the database. If these are not seen test errors
84 //! will be generated.
88 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read1
89 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read2
90 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini read3
91 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini read4
92 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read4
93 END_TESTCASE SYSLIB-SQL-CIT-1840
96 START_TESTCASE SYSLIB-SQL-CIT-1841
97 //! @SYMTestCaseID SYSLIB-SQL-CIT-1841
98 //! @SYMTestCaseDesc PlatSec tests writing to databases
99 //! @SYMTestPriority High
100 //! @SYMTestActions See description and the config file.
101 //! @SYMTestExpectedResults
102 //! The test looks for errors and content
103 //! within the database. If these are not seen test errors
104 //! will be generated.
107 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini write1
108 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini write2
109 END_TESTCASE SYSLIB-SQL-CIT-1841
111 START_TESTCASE SYSLIB-SQL-CIT-1842
112 //! @SYMTestCaseID SYSLIB-SQL-CIT-1842
113 //! @SYMTestCaseDesc PlatSec tests changing the schema of databases
114 //! @SYMTestPriority High
115 //! @SYMTestActions See description and the config file.
116 //! @SYMTestExpectedResults
117 //! The test looks for errors and content
118 //! within the database. If these are not seen test errors
119 //! will be generated.
123 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini schema1
124 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini schema2
125 END_TESTCASE SYSLIB-SQL-CIT-1842
127 START_TESTCASE SYSLIB-SQL-CIT-1843
128 //! @SYMTestCaseID SYSLIB-SQL-CIT-1843
129 //! @SYMTestCaseDesc PlatSec tests checking the enforcement of security during attach operations
130 //! @SYMTestPriority High
131 //! @SYMTestActions See description and the config file.
132 //! @SYMTestExpectedResults
133 //! The test looks for errors and content
134 //! within the database. If these are not seen test errors
135 //! will be generated.
139 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach1
140 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach2
141 RUN_TEST_STEP -1 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini attach3
142 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach4
143 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach5
144 // RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach6
145 END_TESTCASE SYSLIB-SQL-CIT-1843
147 START_TESTCASE SYSLIB-SQL-CIT-1844
148 //! @SYMTestCaseID SYSLIB-SQL-CIT-1844
149 //! @SYMTestCaseDesc PlatSec tests checking the DB Copy operations within the security constraints
150 //! @SYMTestPriority High
151 //! @SYMTestActions See description and the config file.
152 //! @SYMTestExpectedResults
153 //! The test looks for errors and content
154 //! within the database. If these are not seen test errors
155 //! will be generated.
159 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy1
160 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy2
161 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy3
162 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy4
163 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy5
164 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy6
165 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy7
166 END_TESTCASE SYSLIB-SQL-CIT-1844
168 START_TESTCASE SYSLIB-SQL-CIT-1845
169 //! @SYMTestCaseID SYSLIB-SQL-CIT-1845
170 //! @SYMTestCaseDesc PlatSec tests checking that the table level policy has no effect
171 //! as it's not supported yet
172 //! @SYMTestPriority High
173 //! @SYMTestActions See description and the config file.
174 //! @SYMTestExpectedResults
175 //! The test looks for errors and content
176 //! within the database. If these are not seen test errors
177 //! will be generated.
181 RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\security.ini policy1
182 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLCDT z:\TEF_SQL\security.ini policy2
183 END_TESTCASE SYSLIB-SQL-CIT-1845
185 RUN_UTILS DeleteFile c:\ext.pol
187 START_TESTCASE SYSLIB-SQL-CIT-1846
188 //! @SYMTestCaseID SYSLIB-SQL-CIT-1846
189 //! @SYMTestCaseDesc PlatSec tests for RSalSecurity::Externalize and Internalize methods
190 //! @SYMTestPriority High
191 //! @SYMTestActions See description and the config file.
192 //! @SYMTestExpectedResults
193 //! The test looks for errors and content
194 //! within the database. If these are not seen test errors
195 //! will be generated.
199 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External1
200 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External2
201 RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini External3
202 RUN_UTILS MakeReadWrite c:\ext.pol
203 RUN_UTILS DeleteFile c:\ext.pol
204 RUN_UTILS CopyFile z:\TEF_SQL\TestData\ext.pol c:\ext.pol
205 RUN_UTILS MakeReadWrite c:\ext.pol
206 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]ext.db
207 RUN_PANIC_STEP_RESULT 4 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External2
208 END_TESTCASE SYSLIB-SQL-CIT-1846
210 RUN_UTILS DeleteFile c:\ext.pol
211 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec.db
212 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec1.db
213 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec2.db
214 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec4.db
215 RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]sec.db
216 RUN_UTILS DeleteFile c:\private\102827c7\sec.db
217 RUN_UTILS DeleteFile c:\private\102827c8\sec.db
218 RUN_UTILS DeleteFile c:\private\102827c8\sec3.db
219 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec_copy.db
220 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]secpol.db
223 RUN_UTILS DeleteDirectory c:\private\102827c7\
224 RUN_UTILS DeleteDirectory c:\private\102827c8\