Skip to content

Commit 4f09138

Browse files
author
Prasanna Santhanam
committed
Fix the kvm vncAddr test
This test was broken because we reverted to the old listen on all interfaces for vnc. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent 057a6f5 commit 4f09138

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
package com.cloud.hypervisor.kvm.resource;
2121

22-
import org.junit.Test;
2322
import com.cloud.agent.api.to.VirtualMachineTO;
24-
import com.cloud.hypervisor.kvm.resource.LibvirtVMDef;
2523
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
2624
import com.cloud.vm.VirtualMachine;
27-
import com.cloud.vm.VirtualMachine.Type;
25+
import org.junit.Test;
26+
2827
import java.util.Random;
28+
2929
import static org.junit.Assert.assertEquals;
3030

3131
public class LibvirtComputingResourceTest {
@@ -54,7 +54,7 @@ public void testCreateVMFromSpecLegacy() {
5454
boolean haEnabled = false;
5555
boolean limitCpuUse = false;
5656

57-
String vncAddr = "1.2.3.4";
57+
String vncAddr = "";
5858
String vncPassword = "mySuperSecretPassword";
5959

6060
LibvirtComputingResource lcr = new LibvirtComputingResource();
@@ -79,7 +79,7 @@ public void testCreateVMFromSpecLegacy() {
7979
vmStr += "<serial type='pty'>\n";
8080
vmStr += "<target port='0'/>\n";
8181
vmStr += "</serial>\n";
82-
vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "'/>\n";
82+
vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "' />\n";
8383
vmStr += "<console type='pty'>\n";
8484
vmStr += "<target port='0'/>\n";
8585
vmStr += "</console>\n";
@@ -129,7 +129,7 @@ public void testCreateVMFromSpec() {
129129
boolean haEnabled = false;
130130
boolean limitCpuUse = false;
131131

132-
String vncAddr = "1.2.3.4";
132+
String vncAddr = "";
133133
String vncPassword = "mySuperSecretPassword";
134134

135135
LibvirtComputingResource lcr = new LibvirtComputingResource();
@@ -154,7 +154,7 @@ public void testCreateVMFromSpec() {
154154
vmStr += "<serial type='pty'>\n";
155155
vmStr += "<target port='0'/>\n";
156156
vmStr += "</serial>\n";
157-
vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "'/>\n";
157+
vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "' />\n";
158158
vmStr += "<console type='pty'>\n";
159159
vmStr += "<target port='0'/>\n";
160160
vmStr += "</console>\n";

0 commit comments

Comments
 (0)