Ejemplo n.º 1
0
def run_chef_smoketest(vers, vmitype, num = None, enterprise = True):
    '''Run all the major config variations on varied platforms.'''
    
    # this is a standard root package install
    cfg = configs.multi_2umpm_combo(vers)
    cfg['boxtype'] = 'cal-debian6'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist = [ (cfg, 'vagrant', tests.upgrade001()) ]
    
    # now a root user binary install
    cfg = configs.multi_2umpm_combo(vers)
    cfg['binary'] = True
    cfg['boxtype'] = 'cal-lucid64'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    cfg['em'] = None # guarantee no EM since this is a "legacy" boxtype
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
    # now non-root user
    cfg = configs.multi_1um_2pm(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-precise64'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    # now root user datdup
    cfg = configs.multi_1um_2pm(vers)
    cfg['datdup'] = True
    cfg['boxtype'] = 'cal-centos6'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    # now non-root user datdup
    cfg = configs.multi_2umpm_combo(vers)
    cfg['idbuser'] = '******'
    cfg['datdup'] = True
    cfg['boxtype'] = 'cal-centos6'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    # now single node root
    cfg = configs.singlenode(vers)
    cfg['boxtype'] = 'cal-centos6'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    # now single node non-root
    cfg = configs.singlenode(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-precise64'
    cfg['upgrade'] = 'Latest'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    return runlist
Ejemplo n.º 2
0
def run_boxtest(vers, vmitype, num = None, enterprise = True):
    '''Run all boxes variations with single node configs and minimal other variation.'''
    runlist = []
    
    # centos6
    cfg = configs.singlenode(vers)
    cfg['boxtype'] = 'cal-centos6'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # debian6
    cfg = configs.singlenode(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-debian6'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # debian7
    cfg = configs.singlenode(vers)
    cfg['binary'] = True
    cfg['boxtype'] = 'cal-debian7'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # precise64
    cfg = configs.singlenode(vers)
    cfg['boxtype'] = 'cal-precise64'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # trusty64
    cfg = configs.singlenode(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-trusty64'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    return runlist
Ejemplo n.º 3
0
def run_upgrade_suite(vers, vmitype, num = None, enterprise = True):
    '''Runs standard set up upgrade tests for version under test.'''
    if common.props['cluster.cluster.use_em_for_dbinstall']:
        raise Exception('run_upgrade_suite does not support cluster.cluster.use_em_for_dbinstall!')
    
    runlist = []
    
    vmgr = VersionManager()
    
    baselist = common.props['testlib.runlists.upgradefrom']
    streams = baselist.split(',')
    for s in streams:
        # if the stream is the same as the version under test
        # then we need to grab the last release on this stream
        minusone = False if not vers.find(s) == 0 else True
        basever = s
        try:
            basever = vmgr.latest_release_vers(s, minusone)
        except:
            # if we get here, we assume that s is a specific version 
            # that the user wants to upgrade from
            pass
        
        if basever and ConfigSpec._version_greaterthan(vers,basever):
            if ConfigSpec._version_greaterthan(basever, '3.5.1-6' ) or \
                ConfigSpec._version_greaterthan('3.0.0-0', basever ):
                # anything between 3.0 and 3.5.1-5 does not support single server 
                # installs because of the postconfigure race issue.
                
                cfg = configs.singlenode(basever)
                cfg['boxtype'] = 'cal-centos58'
                cfg['binary'] = True
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                cfg['em'] = None # guarantee no EM since this is a "legacy" boxtype
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
                cfg = configs.singlenode(basever)
                cfg['boxtype'] = 'cal-debian6'
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    # will not repeat this comment each time, but we can use the EM
                    # here as long as it is in attach mode and we are on a supported
                    # version
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
                cfg = configs.singlenode(basever)
                cfg['boxtype'] = 'cal-centos6'
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
                cfg = configs.singlenode(basever)
                cfg['boxtype'] = 'cal-precise64'
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

                if ConfigSpec._version_greaterthan(basever, '3.5.1-5' ):
                    # binary install supported after 3.5.1-5
                    cfg = configs.singlenode(basever)
                    cfg['boxtype'] = 'cal-centos6'
                    cfg['idbuser'] = '******'
                    cfg['upgrade'] = vers
                    cfg['enterprise'] = enterprise
                    if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                        cfg['em'] = None
                    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
                    
        
            if not s == '2.2':
                # not going to support multi-node upgrades from 2.2 because if 
                # differences in the Calpont.xml.  Could support, but would need
                # to switch to using a postconfigure.in on the upgrade run of
                # postconfigure
                cfg = configs.multi_1um_2pm(basever)
                cfg['boxtype'] = 'cal-centos6'
                cfg['binary'] = True
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
                cfg = configs.multi_2umpm_combo(basever)
                cfg['boxtype'] = 'cal-centos6'
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )
    
                cfg = configs.multi_1um_2pm(basever)
                cfg['boxtype'] = 'cal-debian6'
                cfg['upgrade'] = vers
                cfg['enterprise'] = enterprise
                if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                    cfg['em'] = None
                runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

                if ConfigSpec._version_greaterthan(basever, '3.5.1-5' ):
                    cfg = configs.multi_2umpm_combo(basever)
                    cfg['boxtype'] = 'cal-precise64'
                    cfg['idbuser'] = '******'
                    cfg['upgrade'] = vers
                    cfg['enterprise'] = enterprise
                    if not ConfigSpec._version_greaterthan(basever, '4.5.1-3' ):
                        cfg['em'] = None
                    runlist.append( (cfg, 'vagrant', tests.upgrade001()) )

    return runlist