1 # -*-coding:utf-8 -* 2 3 # Copyright (c) 2011-2015, Intel Corporation 4 # All rights reserved. 5 # 6 # Redistribution and use in source and binary forms, with or without modification, 7 # are permitted provided that the following conditions are met: 8 # 9 # 1. Redistributions of source code must retain the above copyright notice, this 10 # list of conditions and the following disclaimer. 11 # 12 # 2. Redistributions in binary form must reproduce the above copyright notice, 13 # this list of conditions and the following disclaimer in the documentation and/or 14 # other materials provided with the distribution. 15 # 16 # 3. Neither the name of the copyright holder nor the names of its contributors 17 # may be used to endorse or promote products derived from this software without 18 # specific prior written permission. 19 # 20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 24 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 31 """ 32 Creation, renaming and deletion configuration testcases 33 34 List of tested functions : 35 -------------------------- 36 - [listConfigurations] function 37 - [createConfiguration] function 38 - [deleteConfiguration] function 39 - [renameConfiguration] function 40 41 Test cases : 42 ------------ 43 - Testing configuration creation error 44 - Testing configuration renaming error 45 - Testing configuration deletion error 46 - Testing nominal case 47 """ 48 import os 49 from Util.PfwUnitTestLib import PfwTestCase 50 from Util import ACTLogging 51 log=ACTLogging.Logger() 52 53 54 # Test of Domains - Rename 55 class TestCases(PfwTestCase): 56 def setUp(self): 57 self.pfw.sendCmd("setTuningMode", "on") 58 self.domain_name = "domain_test" 59 self.conf_test = "conf_white" 60 self.conf_test_renamed = "conf_black" 61 self.new_conf_number = 5 62 63 def tearDown(self): 64 self.pfw.sendCmd("setTuningMode", "off") 65 66 def test_Conf_Creation_Error(self): 67 """ 68 Testing configuration creation error 69 ------------------------------------ 70 Test case description : 71 ~~~~~~~~~~~~~~~~~~~~~~~ 72 - Create an already existent configuration 73 - Create a configuration with no name specified 74 - Create a configuration on a wrong domain name 75 Tested commands : 76 ~~~~~~~~~~~~~~~~~ 77 - [createConfiguration] function 78 - [createDomain] function 79 - [listConfigurations] function 80 - [deleteConfiguration] function 81 - [deleteDomain] function 82 Expected result : 83 ~~~~~~~~~~~~~~~~~ 84 - no configuration created 85 - existent configurations not affected by error 86 """ 87 log.D(self.test_Conf_Creation_Error.__doc__) 88 # New domain creation for testing purpose 89 log.I("New domain creation for testing purpose : %s" % (self.domain_name)) 90 log.I("command [createDomain]") 91 out, err = self.pfw.sendCmd("createDomain",self.domain_name, "") 92 assert out == "Done", out 93 assert err == None, "ERROR : command [createDomain] - Error while creating domain %s" % (self.domain_name) 94 log.I("command [createDomain] correctly executed") 95 log.I("Domain %s created" % (self.domain_name)) 96 97 # New configurations creation for testing purpose 98 for iteration in range (self.new_conf_number): 99 new_conf_name = "".join([self.conf_test, "_", str(iteration)]) 100 log.I("New configuration %s creation for domain %s" % (new_conf_name,self.domain_name)) 101 log.I("command [createConfiguration]") 102 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name,new_conf_name) 103 assert out == "Done", out 104 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration %s" % (new_conf_name) 105 log.I("command [createConfiguration] correctly executed") 106 log.I("Configuration %s created for domain %s" % (new_conf_name,self.domain_name)) 107 108 # Domain configurations listing backup 109 log.I("Configurations listing for domain %s" % (self.domain_name)) 110 log.I("command [listConfigurations]") 111 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 112 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 113 log.I("command [listConfigurations] correctly executed") 114 # Saving configurations names 115 f_configurations_backup = open("f_configurations_backup", "w") 116 f_configurations_backup.write(out) 117 f_configurations_backup.close() 118 119 # New configurations creation error 120 log.I("Creating an already existent configurations names") 121 for iteration in range (self.new_conf_number): 122 new_conf_name = "".join([self.conf_test, "_", str(iteration)]) 123 log.I("Trying to create already existent %s configuration for domain %s" % (new_conf_name,self.domain_name)) 124 log.I("command [createConfiguration]") 125 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name,new_conf_name, expectSuccess=False) 126 assert out != "Done", "ERROR : command [createConfiguration] - Error not detected while creating already existent configuration %s" % (new_conf_name) 127 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration %s" % (new_conf_name) 128 log.I("command [createConfiguration] correctly executed") 129 log.I("error correctly detected, no configuration created") 130 log.I("Creating a configuration without specifying a name") 131 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name, expectSuccess=False) 132 assert out != "Done", "ERROR : command [createConfiguration] - Error not detected while creating a configuration without specifying a name" 133 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration" 134 log.I("error correctly detected") 135 log.I("Creating a configuration on a wrong domain name") 136 new_conf_name = "new_conf" 137 out, err = self.pfw.sendCmd("createConfiguration","wrong_domain_name",new_conf_name, expectSuccess=False) 138 assert out != "Done", "ERROR : command [createConfiguration] - Error not detected while creating a configuration on a wrong domain name" 139 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration" 140 log.I("error correctly detected") 141 142 # New domain configurations listing 143 log.I("Configurations listing for domain %s" % (self.domain_name)) 144 log.I("command [listConfigurations]" ) 145 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 146 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 147 log.I("command [listConfigurations] correctly executed") 148 # Saving configurations names 149 f_configurations = open("f_configurations", "w") 150 f_configurations.write(out) 151 f_configurations.close() 152 153 # Checking configurations names integrity 154 log.I("Configurations listing conformity check") 155 f_configurations = open("f_configurations", "r") 156 f_configurations_backup = open("f_configurations_backup", "r") 157 listed_conf_backup = f_configurations_backup.read().splitlines() 158 listed_conf = f_configurations.read().splitlines() 159 assert listed_conf==listed_conf_backup, "ERROR : Error while listing configuration %s (found %s)" % (listed_conf_backup, listed_conf) 160 log.I("No change detected, listed configurations names conform to expected values") 161 162 # New domain deletion 163 log.I("End of test, new domain deletion") 164 log.I("command [deleteDomain]") 165 out, err = self.pfw.sendCmd("deleteDomain",self.domain_name, "") 166 assert out == "Done", "ERROR : %s" % (out) 167 assert err == None, "ERROR : command [deleteDomain] - Error while deleting domain %s" % (self.domain_name) 168 log.I("command [deleteDomain] correctly executed") 169 170 # Closing and deleting temp files 171 f_configurations_backup.close() 172 os.remove("f_configurations_backup") 173 f_configurations.close() 174 os.remove("f_configurations") 175 176 def test_Conf_Renaming_Error(self): 177 """ 178 Testing configuration renaming error 179 ------------------------------------ 180 Test case description : 181 ~~~~~~~~~~~~~~~~~~~~~~~ 182 - Rename a configuration with an already used name 183 - Rename a configuration with no name specified 184 - Rename a configuration on a wrong domain name 185 Tested commands : 186 ~~~~~~~~~~~~~~~~~ 187 - [renameConfiguration] function 188 - [createDomain] function 189 - [listConfigurations] function 190 - [createConfiguration] function 191 - [deleteConfiguration] function 192 - [deleteDomain] function 193 Expected result : 194 ~~~~~~~~~~~~~~~~~ 195 - error detected 196 - no configuration created 197 - existent configurations not affected by error 198 """ 199 log.D(self.test_Conf_Renaming_Error.__doc__) 200 # New domain creation for testing purpose 201 log.I("New domain creation for testing purpose : %s" % (self.domain_name)) 202 log.I("command [createDomain]") 203 out, err = self.pfw.sendCmd("createDomain",self.domain_name, "") 204 assert out == "Done", out 205 assert err == None, "ERROR : command [createDomain] - Error while creating domain %s" % (self.domain_name) 206 log.I("command [createDomain] correctly executed") 207 log.I("Domain %s created" % (self.domain_name)) 208 209 # New configurations creation for testing purpose 210 for iteration in range (self.new_conf_number): 211 new_conf_name = "".join([self.conf_test, "_", str(iteration)]) 212 log.I("New configuration %s creation for domain %s" % (new_conf_name,self.domain_name)) 213 log.I("command [createConfiguration]") 214 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name,new_conf_name) 215 assert out == "Done", out 216 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration %s" % (new_conf_name) 217 log.I("command [createConfiguration] correctly executed") 218 log.I("Configuration %s created for domain %s" % (new_conf_name,self.domain_name)) 219 220 # Domain configurations listing backup 221 log.I("Configurations listing for domain %s" % (self.domain_name)) 222 log.I("command [listConfigurations]") 223 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 224 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 225 log.I("command [listConfigurations] correctly executed") 226 # Saving configurations names 227 f_configurations_backup = open("f_configurations_backup", "w") 228 f_configurations_backup.write(out) 229 f_configurations_backup.close() 230 231 # New configurations renaming error 232 log.I("renaming a configuration with an already used name") 233 for iteration in range (self.new_conf_number-1): 234 conf_name = "".join([self.conf_test, "_", str(iteration)]) 235 new_conf_name = "".join([self.conf_test, "_", str(iteration+1)]) 236 log.I("Trying to rename %s on domain %s with an already used name : %s" % (conf_name,self.domain_name,new_conf_name)) 237 log.I("command [renameConfiguration]" ) 238 out, err = self.pfw.sendCmd("renameConfiguration",self.domain_name,conf_name,new_conf_name, expectSuccess=False) 239 assert out != "Done", "ERROR : command [renameConfiguration] - Error not detected while renaming configuration %s with an already used name" % (new_conf_name) 240 assert err == None, "ERROR : command [renameConfiguration] - Error while renaming configuration %s" % (new_conf_name) 241 log.I("command [renameConfiguration] correctly executed") 242 log.I("error correctly detected, no configuration renamed") 243 log.I("renaming a configuration without specifying a new name") 244 out, err = self.pfw.sendCmd("renameConfiguration",self.domain_name,new_conf_name, expectSuccess=False) 245 assert out != "Done", "ERROR : command [renameConfiguration] - Error not detected while renaming a configuration without specifying a new name" 246 assert err == None, "ERROR : command [renameConfiguration] - Error while renaming configuration" 247 log.I("error correctly detected, no configuration renamed") 248 log.I("renaming a configuration on a wrong domain name") 249 new_conf_name = "new_conf" 250 out, err = self.pfw.sendCmd("renameConfiguration","wrong_domain_name",new_conf_name,"Configuration", expectSuccess=False) 251 assert out != "Done", "ERROR : command [renameConfiguration] - Error not detected while renaming a configuration on a wrong domain name" 252 assert err == None, "ERROR : command [renameConfiguration] - Error while renaming configuration" 253 log.I("error correctly detected, no configuration renamed") 254 255 # New domain configurations listing 256 log.I("Configurations listing for domain %s" % (self.domain_name)) 257 log.I("command [listConfigurations]") 258 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 259 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 260 log.I("command [listConfigurations] correctly executed") 261 # Saving configurations names 262 f_configurations = open("f_configurations", "w") 263 f_configurations.write(out) 264 f_configurations.close() 265 266 # Checking configurations names integrity 267 log.I("Configurations listing conformity check") 268 f_configurations = open("f_configurations", "r") 269 f_configurations_backup = open("f_configurations_backup", "r") 270 listed_conf_backup = f_configurations_backup.read().splitlines() 271 listed_conf = f_configurations.read().splitlines() 272 assert listed_conf==listed_conf_backup, "ERROR : Error while listing configuration %s (found %s)" % (listed_conf_backup, listed_conf) 273 log.I("No change detected, listed configurations names conform to expected values") 274 275 # Testing domain deletion 276 log.I("End of test, new domain deletion") 277 log.I("command [deleteDomain]") 278 out, err = self.pfw.sendCmd("deleteDomain",self.domain_name, "") 279 assert out == "Done", "ERROR : %s" % (out) 280 assert err == None, "ERROR : command [deleteDomain] - Error while deleting domain %s" % (self.domain_name) 281 log.I("command [deleteDomain] correctly executed") 282 283 # Closing and deleting temp files 284 f_configurations_backup.close() 285 os.remove("f_configurations_backup") 286 f_configurations.close() 287 os.remove("f_configurations") 288 289 def test_Conf_Deletion_Error(self): 290 """ 291 Testing configuration deletion error 292 ------------------------------------ 293 Test case description : 294 ~~~~~~~~~~~~~~~~~~~~~~~ 295 - Delete a configuration with a non existent name 296 - Delete a configuration with no name specified 297 - Delete a configuration on a wrong domain name 298 Tested commands : 299 ~~~~~~~~~~~~~~~~~ 300 - [deleteConfiguration] function 301 - [createDomain] function 302 - [listConfigurations] function 303 - [createConfiguration] function 304 - [deleteDomain] function 305 Expected result : 306 ~~~~~~~~~~~~~~~~~ 307 - error detected 308 - no configuration created 309 - existent configurations not affected by error 310 """ 311 print self.test_Conf_Renaming_Error.__doc__ 312 # New domain creation for testing purpose 313 log.I("New domain creation for testing purpose : %s" % (self.domain_name)) 314 log.I("command [createDomain]") 315 out, err = self.pfw.sendCmd("createDomain",self.domain_name, "") 316 assert out == "Done", out 317 assert err == None, "ERROR : command [createDomain] - Error while creating domain %s" % (self.domain_name) 318 log.I("command [createDomain] correctly executed") 319 log.I("Domain %s created" % (self.domain_name)) 320 321 # New configurations creation for testing purpose 322 for iteration in range (self.new_conf_number): 323 new_conf_name = "".join([self.conf_test, "_", str(iteration)]) 324 log.I("New configuration %s creation for domain %s" % (new_conf_name,self.domain_name)) 325 log.I("command [createConfiguration]") 326 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name,new_conf_name) 327 assert out == "Done", out 328 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration %s" % (new_conf_name) 329 log.I("command [createConfiguration] correctly executed") 330 log.I("Configuration %s created for domain %s" % (new_conf_name,self.domain_name)) 331 332 # Domain configurations listing backup 333 log.I("Configurations listing for domain %s" % (self.domain_name)) 334 log.I("command [listConfigurations]") 335 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 336 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 337 log.I("command [listConfigurations] correctly executed") 338 # Saving configurations names 339 f_configurations_backup = open("f_configurations_backup", "w") 340 f_configurations_backup.write(out) 341 f_configurations_backup.close() 342 343 # Configurations deletion errors 344 log.I("Trying various deletions error test cases") 345 log.I("Trying to delete a wrong configuration name on domain %s" % (self.domain_name)) 346 log.I("command [deleteConfiguration]") 347 out, err = self.pfw.sendCmd("deleteConfiguration",self.domain_name,"wrong_configuration_name", expectSuccess=False) 348 assert out != "Done", "ERROR : command [deleteConfiguration] - Error not detected while deleting non existent configuration name" 349 assert err == None, "ERROR : command [deleteConfiguration] - Error while deleting configuration" 350 log.I("command [deleteConfiguration] correctly executed") 351 log.I("error correctly detected, no configuration deleted") 352 log.I("deleting a configuration with no name specified") 353 out, err = self.pfw.sendCmd("deleteConfiguration",self.domain_name, expectSuccess=False) 354 assert out != "Done", "ERROR : command [deleteConfiguration] - Error not detected while deleting a configuration without specifying a name" 355 assert err == None, "ERROR : command [deleteConfiguration] - Error while deleting configuration" 356 log.I("error correctly detected, no configuration deleted") 357 log.I("deleting a configuration on a wrong domain name") 358 out, err = self.pfw.sendCmd("deleteConfiguration","wrong_domain_name",new_conf_name, expectSuccess=False) 359 assert out != "Done", "ERROR : command [deleteConfiguration] - Error not detected while deleting a configuration on a wrong domain name" 360 assert err == None, "ERROR : command [deleteConfiguration] - Error while deleting configuration" 361 log.I("error correctly detected, no configuration deleted") 362 363 # New domain configurations listing 364 log.I("Configurations listing for domain %s" % (self.domain_name)) 365 log.I("command [listConfigurations]") 366 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 367 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 368 log.I("command [listConfigurations] correctly executed") 369 # Saving configurations names 370 f_configurations = open("f_configurations", "w") 371 f_configurations.write(out) 372 f_configurations.close() 373 374 # Checking configurations names integrity 375 log.I("Configurations listing conformity check") 376 f_configurations = open("f_configurations", "r") 377 f_configurations_backup = open("f_configurations_backup", "r") 378 listed_conf_backup = f_configurations_backup.read().splitlines() 379 listed_conf = f_configurations.read().splitlines() 380 assert listed_conf==listed_conf_backup, "ERROR : Error while listing configuration %s (found %s)" % (listed_conf_backup, listed_conf) 381 log.I("No change detected, listed configurations names conform to expected values") 382 383 # Testing domain deletion 384 log.I("End of test, new domain deletion") 385 log.I("command [deleteDomain]") 386 out, err = self.pfw.sendCmd("deleteDomain",self.domain_name, "") 387 assert out == "Done", "ERROR : %s" % (out) 388 assert err == None, "ERROR : command [deleteDomain] - Error while deleting domain %s" % (self.domain_name) 389 log.I("command [deleteDomain] correctly executed") 390 391 # Closing and deleting temp files 392 f_configurations_backup.close() 393 os.remove("f_configurations_backup") 394 f_configurations.close() 395 os.remove("f_configurations") 396 397 def test_Nominal_Case(self): 398 """ 399 Testing nominal cases 400 --------------------- 401 Test case description : 402 ~~~~~~~~~~~~~~~~~~~~~~~ 403 - Create new configurations 404 - List domain configurations 405 - Rename configurations 406 - Delete configurations 407 Tested commands : 408 ~~~~~~~~~~~~~~~~~ 409 - [listConfigurations] function 410 - [createConfiguration] function 411 - [renameConfiguration] function 412 - [deleteConfiguration] function 413 - [createDomain] function 414 - [deleteDomain] function 415 Expected result : 416 ~~~~~~~~~~~~~~~~~ 417 - all operations succeed 418 """ 419 log.D(self.test_Nominal_Case.__doc__) 420 # New domain creation 421 log.I("New domain creation for testing purpose : %s" % (self.domain_name)) 422 log.I("command [createDomain]") 423 out, err = self.pfw.sendCmd("createDomain",self.domain_name, "") 424 assert out == "Done", out 425 assert err == None, "ERROR : command [createDomain] - Error while creating domain %s" % (self.domain_name) 426 log.I("command [createDomain] correctly executed") 427 log.I("Domain %s created" % (self.domain_name)) 428 429 # New configurations creation 430 for iteration in range (self.new_conf_number): 431 new_conf_name = "".join([self.conf_test, "_", str(iteration)]) 432 log.I("New configuration %s creation for domain %s" % (new_conf_name,self.domain_name)) 433 log.I("command [createConfiguration]" ) 434 out, err = self.pfw.sendCmd("createConfiguration",self.domain_name,new_conf_name) 435 assert out == "Done", out 436 assert err == None, "ERROR : command [createConfiguration] - Error while creating configuration %s" % (new_conf_name) 437 log.I("command [createConfiguration] correctly executed") 438 log.I("Configuration %s created for domain %s" % (new_conf_name,self.domain_name)) 439 440 # Listing domain configurations 441 log.I("Configurations listing for domain %s" % (self.domain_name)) 442 log.I("command [listConfigurations]") 443 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 444 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 445 log.I("command [listConfigurations] correctly executed") 446 # Saving configurations names 447 f_configurations = open("f_configurations", "w") 448 f_configurations.write(out) 449 f_configurations.close() 450 # Checking configurations names integrity 451 log.I("Configurations listing conformity check") 452 f_configurations = open("f_configurations", "r") 453 new_conf_names = [self.conf_test + "_" + str(iteration) for iteration in range(self.new_conf_number)] 454 listed_conf = f_configurations.read().strip('\r\n').splitlines() 455 assert listed_conf == new_conf_names, "ERROR : Error while listing configuration, expected '%s', found '%s'" % (new_conf_names, listed_conf) 456 log.I("Listed configurations names conform to expected values") 457 458 # Configuration renaming 459 log.I("Configurations renaming") 460 for iteration in range (self.new_conf_number): 461 conf_name = "".join([self.conf_test, "_", str(iteration)]) 462 new_conf_name = "".join([self.conf_test_renamed, "_", str(iteration)]) 463 log.I("Configuration %s renamed to %s in domain %s" % (conf_name,new_conf_name,self.domain_name)) 464 log.I("command [renameConfiguration]") 465 out, err = self.pfw.sendCmd("renameConfiguration",self.domain_name,conf_name,new_conf_name) 466 assert out == "Done", out 467 assert err == None, "ERROR : command [renameConfiguration] - Error while renaming configuration %s to %s" % (conf_name,new_conf_name) 468 log.I("command [renameConfiguration] correctly executed") 469 log.I("Configuration %s renamed to %s for domain %s" % (conf_name,new_conf_name,self.domain_name)) 470 # Listing domain configurations 471 log.I("Configurations listing to check configurations renaming") 472 log.I("command [listConfigurations]") 473 out, err = self.pfw.sendCmd("listConfigurations",self.domain_name, "") 474 assert err == None, "ERROR : command [listConfigurations] - Error while listing configurations for domain %s" % (self.domain_name) 475 log.I("command [listConfigurations] correctly executed") 476 # Saving configurations names 477 configurations_renamed = out 478 # Checking configurations names integrity 479 log.I("Configurations listing conformity check") 480 new_conf_names = [self.conf_test_renamed + "_" + str(iteration) for iteration in range(self.new_conf_number)] 481 listed_conf = configurations_renamed.strip('\r\n').splitlines() 482 assert listed_conf == new_conf_names, "ERROR : Error while renaming configuration, expected '%s', found '%s'" % (new_conf_names, listed_conf) 483 log.I("Listed configurations names conform to expected values, renaming successfull") 484 485 # New domain deletion 486 log.I("End of test, new domain deletion") 487 log.I("command [deleteDomain]") 488 out, err = self.pfw.sendCmd("deleteDomain",self.domain_name, "") 489 assert out == "Done", "ERROR : %s" % (out) 490 assert err == None, "ERROR : command [deleteDomain] - Error while deleting domain %s" % (self.domain_name) 491 log.I("command [deleteDomain] correctly executed") 492 493 # Closing and deleting temp file 494 f_configurations.close() 495 os.remove("f_configurations") 496