use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class MultipleServicesMonitoringStrategyTest method testProcessingSoftwareGluster.
@Test
public void testProcessingSoftwareGluster() {
doThrow(new RuntimeException()).when(glusterStrategy).processSoftwareCapabilities(any());
exception.expect(RuntimeException.class);
VDS vds = new VDS();
strategy.processSoftwareCapabilities(vds);
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class VirtMonitoringStrategyTest method testProtectRhel7InRhel6.
@Test
public void testProtectRhel7InRhel6() {
VDS vds = createBaseVds();
vdsFromDb.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
vds.setHostOs("RHEL - 7Server - 1.el7");
virtStrategy.processSoftwareCapabilities(vds);
assertEquals(VDSStatus.NonOperational, vds.getStatus());
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class VirtMonitoringStrategyTest method testNeedToProcessHardwareCapsFalse.
@Test
public void testNeedToProcessHardwareCapsFalse() {
VDS oldVds = new VDS();
oldVds.setClusterId(Guid.newGuid());
oldVds.setId(Guid.newGuid());
oldVds.setCpuFlags("flag1");
VDS newVds = oldVds.clone();
assertFalse(virtStrategy.processHardwareCapabilitiesNeeded(oldVds, newVds));
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class VirtMonitoringStrategyTest method testAllowRhel6InRhel7.
@Test
public void testAllowRhel6InRhel7() {
VDS vds = createBaseVds();
vdsFromDb.setHostOs("RHEL - 7Server - 1.el7");
vds.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
cluster.setClusterPolicyId(ClusterPolicy.UPGRADE_POLICY_GUID);
virtStrategy.processSoftwareCapabilities(vds);
assertFalse(vds.getStatus().equals(VDSStatus.NonOperational));
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class VirtMonitoringStrategyTest method testAllowRhel7InRhel6.
@Test
public void testAllowRhel7InRhel6() {
VDS vds = createBaseVds();
vdsFromDb.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
vds.setHostOs("RHEL - 7Server - 1.el7");
cluster.setClusterPolicyId(ClusterPolicy.UPGRADE_POLICY_GUID);
virtStrategy.processSoftwareCapabilities(vds);
assertFalse(vds.getStatus().equals(VDSStatus.NonOperational));
}
Aggregations