Changeset 79330 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Jun 25, 2019 2:53:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r79328 r79330 109 109 were installed and running on the guest to be tested. 110 110 """ 111 def __init__(self ):111 def __init__(self, oCreds = None): 112 112 self.oGuest = None; ##< IGuest. 113 self.oCreds = None##< type: tdCtxCreds113 self.oCreds = oCreds ##< type: tdCtxCreds 114 114 self.timeoutMS = 30 * 1000; ##< 30s timeout 115 115 self.oGuestSession = None; ##< IGuestSession reference or None. … … 224 224 Test for copying files from the guest to the host. 225 225 """ 226 def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword = None, fFlags = None, oSrc = None): 227 tdTestGuestCtrlBase.__init__(self); 228 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 226 def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None): 227 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 229 228 self.sSrc = sSrc; 230 229 self.sDst = sDst; … … 236 235 class tdTestCopyFromDir(tdTestCopyFrom): 237 236 238 def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword= None, fFlags = None, oSrc = None, fIntoDst = False):239 tdTestCopyFrom.__init__(self, sSrc, sDst, sUser, sPassword, fFlags, oSrc);237 def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None, oSrc = None, fIntoDst = False): 238 tdTestCopyFrom.__init__(self, sSrc, sDst, oCreds, fFlags, oSrc); 240 239 self.fIntoDst = fIntoDst; # hint to the verification code that sDst == oSrc, rather than sDst+oSrc.sNAme == oSrc. 241 240 … … 267 266 Test for copying files from the host to the guest. 268 267 """ 269 def __init__(self, sSrc = "", sDst = "", sUser = None, sPassword = None, fFlags = None): 270 tdTestGuestCtrlBase.__init__(self); 271 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 268 def __init__(self, sSrc = "", sDst = "", oCreds = None, fFlags = None): 269 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 272 270 self.sSrc = sSrc; 273 271 self.sDst = sDst; … … 284 282 Test for directoryCreate call. 285 283 """ 286 def __init__(self, sDirectory = "", sUser = None, sPassword = None, fMode = 0, fFlags = None): 287 tdTestGuestCtrlBase.__init__(self); 288 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 284 def __init__(self, sDirectory = "", oCreds = None, fMode = 0, fFlags = None): 285 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 289 286 self.sDirectory = sDirectory; 290 287 self.fMode = fMode; … … 295 292 Test for the directoryCreateTemp call. 296 293 """ 297 def __init__(self, sDirectory = "", sTemplate = "", sUser = None, sPassword = None, fMode = 0, fSecure = False): 298 tdTestGuestCtrlBase.__init__(self); 299 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 294 def __init__(self, sDirectory = "", sTemplate = "", oCreds = None, fMode = 0, fSecure = False): 295 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 300 296 self.sDirectory = sDirectory; 301 297 self.sTemplate = sTemplate; … … 307 303 Test for the directoryOpen call. 308 304 """ 309 def __init__(self, sDirectory = "", sUser = None, sPassword = None, sFilter = "", fFlags = None): 310 tdTestGuestCtrlBase.__init__(self); 311 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 305 def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None): 306 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 312 307 self.sDirectory = sDirectory; 313 308 self.sFilter = sFilter; … … 318 313 Test for the opening, reading and closing a certain directory. 319 314 """ 320 def __init__(self, sDirectory = "", sUser = None, sPassword = None, 321 sFilter = "", fFlags = None): 322 tdTestDirOpen.__init__(self, sDirectory, sUser, sPassword, sFilter, fFlags); 315 def __init__(self, sDirectory = "", oCreds = None, sFilter = "", fFlags = None): 316 tdTestDirOpen.__init__(self, sDirectory, oCreds, sFilter, fFlags); 323 317 324 318 class tdTestExec(tdTestGuestCtrlBase): … … 328 322 """ 329 323 def __init__(self, sCmd = "", asArgs = None, aEnv = None, fFlags = None, # pylint: disable=too-many-arguments 330 timeoutMS = 5 * 60 * 1000, sUser = None, sPassword = None, sDomain = None, fWaitForExit = True): 331 tdTestGuestCtrlBase.__init__(self); 332 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain); 324 timeoutMS = 5 * 60 * 1000, oCreds = None, fWaitForExit = True): 325 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 333 326 self.sCmd = sCmd; 334 327 self.asArgs = asArgs if asArgs is not None else [sCmd,]; … … 347 340 Test for the file exists API call (fileExists). 348 341 """ 349 def __init__(self, sFile = "", sUser = None, sPassword = None): 350 tdTestGuestCtrlBase.__init__(self); 351 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 342 def __init__(self, sFile = "", oCreds = None): 343 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 352 344 self.sFile = sFile; 353 345 … … 356 348 Test querying guest file information. 357 349 """ 358 def __init__(self, sFile = "", sUser = None, sPassword = None): 359 tdTestGuestCtrlBase.__init__(self); 360 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 350 def __init__(self, sFile = "", oCreds = None): 351 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 361 352 self.sFile = sFile; 362 353 … … 365 356 Removal base. 366 357 """ 367 def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword = None): 368 tdTestGuestCtrlBase.__init__(self); 369 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 358 def __init__(self, sPath, fRcExpect = True, oCreds = None): 359 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 370 360 self.sPath = sPath; 371 361 self.fRcExpect = fRcExpect; … … 392 382 Remove a single file. 393 383 """ 394 def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword= None):395 tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);384 def __init__(self, sPath, fRcExpect = True, oCreds = None): 385 tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds); 396 386 397 387 def execute(self, oSubTstDrv): … … 414 404 Remove a single directory if empty. 415 405 """ 416 def __init__(self, sPath, fRcExpect = True, sUser = None, sPassword= None):417 tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);406 def __init__(self, sPath, fRcExpect = True, oCreds = None): 407 tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds); 418 408 419 409 def execute(self, oSubTstDrv): … … 434 424 Recursively remove a directory tree. 435 425 """ 436 def __init__(self, sPath, afFlags = None, fRcExpect = True, fNotExist = False, sUser = None, sPassword= None):437 tdTestRemoveBase.__init__(self, sPath, fRcExpect, sUser, sPassword);426 def __init__(self, sPath, afFlags = None, fRcExpect = True, fNotExist = False, oCreds = None): 427 tdTestRemoveBase.__init__(self, sPath, fRcExpect, oCreds = None); 438 428 self.afFlags = afFlags if afFlags is not None else []; 439 429 self.fNotExist = fNotExist; # Hack for the ContentOnly scenario where the dir does not exist. … … 479 469 Test querying guest file information. 480 470 """ 481 def __init__(self, sFile = "", sUser = None, sPassword = None, cbSize = 0, eFileType = 0): 482 tdTestGuestCtrlBase.__init__(self); 483 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 471 def __init__(self, sFile = "", oCreds = None, cbSize = 0, eFileType = 0): 472 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 484 473 self.sFile = sFile; 485 474 self.cbSize = cbSize; … … 490 479 Test for the IGuestFile object. 491 480 """ 492 def __init__(self, sFile = "", sUser = None, sPassword = None): 493 tdTestGuestCtrlBase.__init__(self); 494 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 481 def __init__(self, sFile = "", oCreds = None): 482 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 495 483 self.sFile = sFile; 496 484 … … 499 487 Test for the file size query API call (fileQuerySize). 500 488 """ 501 def __init__(self, sFile = "", sUser = None, sPassword = None): 502 tdTestGuestCtrlBase.__init__(self); 503 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 489 def __init__(self, sFile = "", oCreds = None): 490 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 504 491 self.sFile = sFile; 505 492 … … 509 496 """ 510 497 def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None, 511 fCreationMode = 0o660, sUser = None, sPassword = None): 512 tdTestGuestCtrlBase.__init__(self); 513 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain = None); 498 fCreationMode = 0o660, oCreds = None): 499 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 514 500 self.sFile = sFile; 515 501 self.eAccessMode = eAccessMode if eAccessMode is not None else vboxcon.FileAccessMode_ReadOnly; … … 570 556 """ 571 557 def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None, 572 fCreationMode = 0o660, cbOpenExpected = 0, sUser = None, sPassword= None):573 tdTestFileOpen.__init__(self, sFile, eAccessMode, eAction, eSharing, fCreationMode, sUser, sPassword);558 fCreationMode = 0o660, cbOpenExpected = 0, oCreds = None): 559 tdTestFileOpen.__init__(self, sFile, eAccessMode, eAction, eSharing, fCreationMode, oCreds); 574 560 self.cbOpenExpected = cbOpenExpected; 575 561 … … 624 610 """ 625 611 def __init__(self, sFile = "", eAccessMode = None, eAction = None, eSharing = None, # pylint: disable=too-many-arguments 626 fCreationMode = 0o660, atChunks = None, fUseAtApi = False, abContent = None, sUser = None, sPassword= None):612 fCreationMode = 0o660, atChunks = None, fUseAtApi = False, abContent = None, oCreds = None): 627 613 tdTestFileOpen.__init__(self, sFile, eAccessMode if eAccessMode is not None else vboxcon.FileAccessMode_WriteOnly, 628 eAction, eSharing, fCreationMode, sUser, sPassword);614 eAction, eSharing, fCreationMode, oCreds); 629 615 assert atChunks is not None; 630 616 self.atChunks = atChunks # type: list(tuple(int,bytearray)) … … 767 753 Opens the file and checks the content using the read API. 768 754 """ 769 def __init__(self, sFile = "", eSharing = None, abContent = None, cbContentExpected = None, sUser = None, sPassword= None):770 tdTestFileOpen.__init__(self, sFile = sFile, eSharing = eSharing, sUser = sUser, sPassword = sPassword);755 def __init__(self, sFile = "", eSharing = None, abContent = None, cbContentExpected = None, oCreds = None): 756 tdTestFileOpen.__init__(self, sFile = sFile, eSharing = eSharing, oCreds = oCreds); 771 757 self.abContent = abContent # type: bytearray 772 758 self.cbContentExpected = cbContentExpected; … … 818 804 """ 819 805 def __init__(self, sUser = None, sPassword = None, sDomain = None, sSessionName = ""): 820 tdTestGuestCtrlBase.__init__(self );806 tdTestGuestCtrlBase.__init__(self, oCreds = tdCtxCreds(sUser, sPassword, sDomain)); 821 807 self.sSessionName = sSessionName; 822 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain);823 808 824 809 def getSessionCount(self, oVBoxMgr): … … 1264 1249 Test updating the Guest Additions inside the guest. 1265 1250 """ 1266 def __init__(self, sSrc = "", asArgs = None, fFlags = None, 1267 sUser = None, sPassword = None, sDomain = None): 1268 tdTestGuestCtrlBase.__init__(self); 1269 self.oCreds = tdCtxCreds(sUser, sPassword, sDomain); 1251 def __init__(self, sSrc = "", asArgs = None, fFlags = None, oCreds = None): 1252 tdTestGuestCtrlBase.__init__(self, oCreds = oCreds); 1270 1253 self.sSrc = sSrc; 1271 1254 self.asArgs = asArgs;
Note:
See TracChangeset
for help on using the changeset viewer.