VirtualBox

Changeset 80834 in vbox


Ignore:
Timestamp:
Sep 16, 2019 8:23:55 PM (5 years ago)
Author:
vboxsync
Message:

ValKit/tdAddGuestCtrl.py: Adjusted session environment tests to match current IPRT/main environment validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r80829 r80834  
    21312131        Tests the guest session environment changes.
    21322132        """
     2133        enmErrInvalidVarName = vbox.ComError.VBOX_E_IPRT_ERROR if self.oTstDrv.fpApiRev >= 6.1 else vbox.ComError.E_INVALIDARG;
    21332134        aoTests = [
    21342135            # Check basic operations.
     
    21882189            # Invalid variable names.
    21892190            tdTestSessionEx([
    2190                 tdStepSessionSetEnv('', 'FOO', vbox.ComError.E_INVALIDARG),
     2191                tdStepSessionSetEnv('', 'FOO', enmErrInvalidVarName),
    21912192                tdStepSessionCheckEnv(),
    21922193                tdStepRequireMinimumApiVer(5.0), # 4.3 is too relaxed checking input!
    2193                 tdStepSessionBulkEnv(['', 'foo=bar'], vbox.ComError.E_INVALIDARG),
     2194                tdStepSessionBulkEnv(['', 'foo=bar'], enmErrInvalidVarName),
    21942195                tdStepSessionCheckEnv(),
    2195                 tdStepSessionSetEnv('FOO=', 'BAR', vbox.ComError.E_INVALIDARG),
     2196                tdStepSessionSetEnv('FOO=', 'BAR', enmErrInvalidVarName),
    21962197                tdStepSessionCheckEnv(),
    21972198                ]),
     
    22202221        # Leading '=' in the name is okay for windows guests in 6.1 and later (for driver letter CWDs).
    22212222        if (self.oTstDrv.fpApiVer < 6.1 and self.oTstDrv.fpApiVer >= 5.0) or not oTestVm.isWindows():
    2222             aoTests.append(tdTestSessionEx([tdStepSessionSetEnv('=', '===', vbox.ComError.E_INVALIDARG),
     2223            aoTests.append(tdTestSessionEx([tdStepSessionSetEnv('=', '===', enmErrInvalidVarName),
    22232224                                            tdStepSessionCheckEnv(),
    2224                                             tdStepSessionSetEnv('=FOO', 'BAR', vbox.ComError.E_INVALIDARG),
     2225                                            tdStepSessionSetEnv('=FOO', 'BAR', enmErrInvalidVarName),
    22252226                                            tdStepSessionCheckEnv(),
    2226                                             tdStepSessionBulkEnv(['=', 'foo=bar'], vbox.ComError.E_INVALIDARG),
     2227                                            tdStepSessionBulkEnv(['=', 'foo=bar'], enmErrInvalidVarName),
    22272228                                            tdStepSessionCheckEnv(),
    2228                                             tdStepSessionBulkEnv(['=FOO', 'foo=bar'], vbox.ComError.E_INVALIDARG),
     2229                                            tdStepSessionBulkEnv(['=FOO', 'foo=bar'], enmErrInvalidVarName),
    22292230                                            tdStepSessionCheckEnv(),
    22302231                                            ]));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette