19 Description: |
19 Description: |
20 |
20 |
21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
23 <project name="test_deconfigure_task" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
23 <project name="test_deconfigure_task" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 Deconfigure testing targets for script deconfigure.pl |
|
26 </description> |
24 <property environment="env"/> |
27 <property environment="env"/> |
25 |
28 |
26 <property name="helium.dir" location="../../.." /> |
29 <property name="helium.dir" location="../../.." /> |
27 <import file="../../../helium.ant.xml"/> |
30 <import file="../../../helium.ant.xml"/> |
28 |
31 |
29 |
32 |
30 <target name="test-deconfigure-no-arguments-case"> |
33 <target name="test-deconfigure-no-arguments-case"> |
31 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName password"> |
34 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password ccmProject"> |
32 <hlm:deconfigure/> |
35 <hlm:deconfigure/> |
33 </au:expectfailure> |
36 </au:expectfailure> |
34 </target> |
37 </target> |
35 |
38 |
36 <target name="test-deconfigure-task-database-set-case"> |
39 <target name="test-deconfigure-task-database-set-case"> |
37 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - projectName password"> |
40 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - password ccmProject"> |
38 <hlm:deconfigure database="to1tobet"/> |
41 <hlm:deconfigure database="to1tobet"/> |
39 </au:expectfailure> |
42 </au:expectfailure> |
40 <au:assertLogContains text="Set database to to1tobet" level="debug"/> |
43 <au:assertLogContains text="Set database to to1tobet" /> |
41 </target> |
44 </target> |
42 |
45 |
43 <target name="test-deconfigure-task-projectName-set-case"> |
46 <target name="test-deconfigure-task-ccmproject-set-case"> |
44 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password"> |
47 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password"> |
45 <hlm:deconfigure projectName="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/> |
48 <hlm:deconfigure ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/> |
46 </au:expectfailure> |
49 </au:expectfailure> |
47 <au:assertLogContains text="Set projectName to helium-to1tobet#helium_4.49:project:vc1s60p1#1" level="debug"/> |
50 <au:assertLogContains text="Set ccmProject to helium-to1tobet#helium_4.49:project:vc1s60p1#1" /> |
48 </target> |
51 </target> |
49 |
52 |
50 <target name="test-deconfigure-task-password-set-case"> |
53 <target name="test-deconfigure-task-password-set-case"> |
51 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName"> |
54 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database ccmProject"> |
52 <hlm:deconfigure password="test"/> |
55 <hlm:deconfigure password="test"/> |
53 </au:expectfailure> |
56 </au:expectfailure> |
54 <au:assertLogContains text="Set password to test" level="debug"/> |
57 <au:assertLogContains text="Set password to ******"/> |
55 </target> |
58 </target> |
56 |
59 |
57 <target name="test-deconfigure-task-consider-branch-releases-set-case"> |
60 <target name="test-deconfigure-task-consider-branch-releases-set-case"> |
58 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName password"> |
61 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password ccmProject"> |
59 <hlm:deconfigure considerBranchReleases="yes"/> |
62 <hlm:deconfigure considerBranchReleases="yes"/> |
60 </au:expectfailure> |
63 </au:expectfailure> |
61 <au:assertLogContains text="Set considerBranchReleases to true" level="debug"/> |
64 <au:assertLogContains text="Set considerBranchReleases to true"/> |
62 </target> |
65 </target> |
63 |
66 |
64 <target name="test-deconfigure-task-verbosity-set-to-quiet-case"> |
67 <target name="test-deconfigure-task-verbosity-set-to-quiet-case"> |
65 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName password"> |
68 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password ccmProject"> |
66 <hlm:deconfigure verbosity="0"/> |
69 <hlm:deconfigure verbosity="0"/> |
67 </au:expectfailure> |
70 </au:expectfailure> |
68 <au:assertLogContains text="Set verbosity to 0" level="debug"/> |
71 <au:assertLogContains text="Set verbosity to 0"/> |
69 </target> |
72 </target> |
70 |
73 |
71 <target name="test-deconfigure-task-verbosity-set-to-verbose-case"> |
74 <target name="test-deconfigure-task-verbosity-set-to-verbose-case"> |
72 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName password"> |
75 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password ccmProject"> |
73 <hlm:deconfigure verbosity="1"/> |
76 <hlm:deconfigure verbosity="1"/> |
74 </au:expectfailure> |
77 </au:expectfailure> |
75 <au:assertLogContains text="Set verbosity to 1" level="debug"/> |
78 <au:assertLogContains text="Set verbosity to 1"/> |
76 </target> |
79 </target> |
77 |
80 |
78 <target name="test-deconfigure-task-verbosity-set-to-very-verbose-case"> |
81 <target name="test-deconfigure-task-verbosity-set-to-very-verbose-case"> |
79 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database projectName password"> |
82 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database password ccmProject"> |
80 <hlm:deconfigure verbosity="2"/> |
83 <hlm:deconfigure verbosity="2"/> |
81 </au:expectfailure> |
84 </au:expectfailure> |
82 <au:assertLogContains text="Set verbosity to 2" level="debug"/> |
85 <au:assertLogContains text="Set verbosity to 2"/> |
83 </target> |
86 </target> |
84 |
87 |
85 <target name="test-deconfigure-task-database-and-projectName-set-case"> |
88 <target name="test-deconfigure-task-database-and-ccmproject-set-case"> |
86 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - password"> |
89 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - password"> |
87 <hlm:deconfigure database="to1tobet" projectName="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/> |
90 <hlm:deconfigure database="to1tobet" ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/> |
88 </au:expectfailure> |
91 </au:expectfailure> |
89 </target> |
92 </target> |
90 |
93 |
91 <target name="test-deconfigure-task-database-and-password-set-case"> |
94 <target name="test-deconfigure-task-database-and-password-set-case"> |
92 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - projectName"> |
95 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - ccmProject"> |
93 <hlm:deconfigure database="to1tobet" password="test"/> |
96 <hlm:deconfigure database="to1tobet" password="test"/> |
94 </au:expectfailure> |
97 </au:expectfailure> |
95 </target> |
98 </target> |
96 |
99 |
97 <target name="test-deconfigure-task-projectName-and-password-set-case"> |
100 <target name="test-deconfigure-task-ccmproject-and-password-set-case"> |
98 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database"> |
101 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: mandatory attributes are not defined - database"> |
99 <hlm:deconfigure projectName="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/> |
102 <hlm:deconfigure ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/> |
100 </au:expectfailure> |
103 </au:expectfailure> |
101 </target> |
104 </target> |
102 |
105 |
103 <target name="test-deconfigure-task-all-mandatory-arguments-given-but-password-wrong-case"> |
106 <target name="test-deconfigure-task-all-mandatory-arguments-given-but-password-wrong-case"> |
104 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Script execution failure."> |
107 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Script execution failure."> |
105 <hlm:deconfigure database="to1tobet" projectName="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/> |
108 <hlm:deconfigure database="to1tobet" ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/> |
106 </au:expectfailure> |
109 </au:expectfailure> |
107 <au:assertLogContains text="Set database to to1tobet" level="debug"/> |
110 <au:assertLogContains text="Set database to to1tobet" /> |
108 <au:assertLogContains text="Set projectName to helium-to1tobet#helium_4.49:project:vc1s60p1#1" level="debug"/> |
111 <au:assertLogContains text="Set ccmProject to helium-to1tobet#helium_4.49:project:vc1s60p1#1" /> |
109 <au:assertLogContains text="Set password to test" level="debug"/> |
112 <au:assertLogContains text="Set password to ******" /> |
110 </target> |
113 </target> |
111 |
114 |
112 <target name="test-deconfigure-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-case"> |
115 <target name="test-deconfigure-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-case"> |
113 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Script execution failure."> |
116 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Script execution failure."> |
114 <hlm:deconfigure database="to1tobet" projectName="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" considerBranchReleases="yes" verbosity="1"/> |
117 <hlm:deconfigure database="to1tobet" ccmProject="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" considerBranchReleases="yes" verbosity="1"/> |
115 </au:expectfailure> |
118 </au:expectfailure> |
116 <au:assertLogContains text="Set database to to1tobet" level="debug"/> |
119 <au:assertLogContains text="Set database to to1tobet" /> |
117 <au:assertLogContains text="Set projectName to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" level="debug"/> |
120 <au:assertLogContains text="Set ccmProject to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" /> |
118 <au:assertLogContains text="Set password to test" level="debug"/> |
121 <au:assertLogContains text="Set password to ******" /> |
119 <au:assertLogContains text="Set considerBranchReleases to true" level="debug"/> |
122 <au:assertLogContains text="Set considerBranchReleases to true" /> |
120 <au:assertLogContains text="Set verbosity to 1" level="debug"/> |
123 <au:assertLogContains text="Set verbosity to 1" /> |
121 </target> |
124 </target> |
122 |
125 |
123 <target name="test-deconfigure-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-and-verbosity-wrong-case"> |
126 <target name="test-deconfigure-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-and-verbosity-wrong-case"> |
124 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Verbosity level is not recognised. Legal values are: 0 - quiet, 1 - verbose or 2 - very verbose"> |
127 <au:expectfailure expectedMessage="[hlm:deconfigure] Error: Verbosity level is not recognised. Legal values are: 0 - quiet, 1 - verbose or 2 - very verbose"> |
125 <hlm:deconfigure database="to1tobet" projectName="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" considerBranchReleases="no" verbosity="9"/> |
128 <hlm:deconfigure database="to1tobet" ccmProject="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" considerBranchReleases="no" verbosity="9"/> |
126 </au:expectfailure> |
129 </au:expectfailure> |
127 <au:assertLogContains text="Set database to to1tobet" level="debug"/> |
130 <au:assertLogContains text="Set database to to1tobet" /> |
128 <au:assertLogContains text="Set projectName to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" level="debug"/> |
131 <au:assertLogContains text="Set ccmProject to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1"/> |
129 <au:assertLogContains text="Set password to test" level="debug"/> |
132 <au:assertLogContains text="Set password to ******" /> |
130 <au:assertLogContains text="Set considerBranchReleases to false" level="debug"/> |
133 <au:assertLogContains text="Set considerBranchReleases to false" /> |
131 <au:assertLogContains text="Set verbosity to 9" level="debug"/> |
134 <au:assertLogContains text="Set verbosity to 9" /> |
132 </target> |
135 </target> |
133 |
136 |
134 </project> |
137 </project> |