コード例 #1
0
def test_edbq():
    output = engine_db_query.EngineDBQueryVDSMversion(context_wrap(OUTPUT))
    assert output.get(
        'id', None
    ) == 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
    assert output.result[0].get('rpm_version') == 'vdsm-4.30.40-1.el7ev'

    # for multiple hosts
    output = engine_db_query.EngineDBQueryVDSMversion(context_wrap(OUTPUT_2))
    assert output.result == [{
        'vds_name': 'hosto',
        'rpm_version': 'vdsm-4.40.20-33.git1b7dedcf3.fc30'
    }, {
        'vds_name': 'hosto2',
        'rpm_version': 'vdsm-4.40.13-38.gite9bae3c68.fc30'
    }]

    # No content
    assert 'Empty output.' in skip_exception_check(
        engine_db_query.EngineDBQueryVDSMversion)

    # Error
    with pytest.raises(ParseException) as e:
        engine_db_query.EngineDBQueryVDSMversion(context_wrap(ERROR))
    assert "couldn't parse json." in str(e)
コード例 #2
0
def test_ansible_tower_license__data_ab_type():
    assert 'Empty output.' in skip_exception_check(AnsibleTowerLicense)

    with pytest.raises(ContentException):
        AnsibleTowerLicense(context_wrap(NG_COMMAND_1))

    with pytest.raises(ParseException):
        AnsibleTowerLicense(context_wrap(NG_COMMAND_2))

    with pytest.raises(ParseException):
        AnsibleTowerLicense(context_wrap(NO_LICENSE))
コード例 #3
0
def test_skip():
    skip_exception_check(grubenv.GrubEnv, output_str="# test")
    skip_exception_check(grubenv.GrubEnv)
コード例 #4
0
def test_freeipa_healthcheck_log_empty():
    assert 'Empty output.' in skip_exception_check(FreeIPAHealthCheckLog)
コード例 #5
0
def test_tags_empty():
    assert 'Empty output.' in skip_exception_check(Tags)
コード例 #6
0
 def test_empty(self):
     assert 'Empty output.' in skip_exception_check(RhvLogCollectorJson)
コード例 #7
0
def test_teamdctl_state_dump_empty():
    assert 'Empty output.' in skip_exception_check(TeamdctlStateDump)
コード例 #8
0
def test_empty():
    assert 'Empty output.' in skip_exception_check(NdctlListNi)
コード例 #9
0
 def test_ceph_cfg_info_empty(self):
     assert 'Empty output.' in skip_exception_check(CephCfgInfo)
コード例 #10
0
 def test_ceph_ec_profile_get_empty(self):
     assert 'Empty output.' in skip_exception_check(CephECProfileGet)
コード例 #11
0
 def test_ceph_s_empty(self):
     assert 'Empty output.' in skip_exception_check(CephS)
コード例 #12
0
 def test_ceph_os_df_empty(self):
     assert 'Empty output.' in skip_exception_check(CephOsdDf)
コード例 #13
0
def test_empty():
    assert 'Empty output.' in skip_exception_check(RhsmReleaseVer)
コード例 #14
0
def test_cni_podman_bridge_conf_empty():
    assert 'Empty output.' in skip_exception_check(CNIPodmanBridgeConf)
コード例 #15
0
def test_version_info_empty():
    assert 'Empty output.' in skip_exception_check(version_info.VersionInfo)
コード例 #16
0
 def test_ceph_health_detail_empty(self):
     assert 'Empty output.' in skip_exception_check(CephHealthDetail)
コード例 #17
0
 def test_ceph_df_detail_empty(self):
     assert 'Empty output.' in skip_exception_check(CephDfDetail)
コード例 #18
0
def test_empty_content():
    skip_exception_check(nfnetlink_queue.NfnetLinkQueue)
コード例 #19
0
 def test_ceph_osd_tree_empty(self):
     assert 'Empty output.' in skip_exception_check(CephOsdTree)
コード例 #20
0
ファイル: test_cloud_cfg.py プロジェクト: bfahr/insights-core
def test_cloud_cfg_empty():
    assert 'Empty output.' in skip_exception_check(cloud_cfg.CloudCfg)
コード例 #21
0
 def test_ceph_report_empty(self):
     assert 'Empty output.' in skip_exception_check(CephReport)
コード例 #22
0
def test_empty():
    assert 'Empty output.' in skip_exception_check(HttpdOnNFSFilesCount)
コード例 #23
0
def test_virt_uuid_facts_empty():
    assert 'Empty output.' in skip_exception_check(VirtUuidFacts)