Skip to content

Commit

Permalink
Fix multus guestagent test
Browse files Browse the repository at this point in the history
Don't use yum, that makes the test unpredictable.
  • Loading branch information
rmohr committed Apr 30, 2019
1 parent bbcc1de commit cbc88c4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/vmi_multus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,16 +665,20 @@ var _ = Describe("Multus", func() {
ep2Ip := "1.0.0.11/24"
ep1IpV6 := "fe80::ce3d:82ff:fe52:24c0/64"
ep2IpV6 := "fe80::ce3d:82ff:fe52:24c1/64"
agentVMI = tests.NewRandomVMIWithEphemeralDiskAndUserdata(tests.ContainerDiskFor(tests.ContainerDiskFedora), fmt.Sprintf(`#!/bin/bash
echo "fedora" |passwd fedora --stdin
ip link add ep1 type veth peer name ep2
ip addr add %s dev ep1
userdata := fmt.Sprintf(`#!/bin/bash
echo "fedora" |passwd fedora --stdin
setenforce 0
ip link add ep1 type veth peer name ep2
ip addr add %s dev ep1
ip addr add %s dev ep2
ip addr add %s dev ep1
ip addr add %s dev ep2
yum install -y qemu-guest-agent
systemctl start qemu-guest-agent
`, ep1Ip, ep2Ip, ep1IpV6, ep2IpV6))
mkdir -p /usr/local/bin
curl %s > /usr/local/bin/qemu-ga
chmod +x /usr/local/bin/qemu-ga
systemd-run --unit=guestagent /usr/local/bin/qemu-ga
`, ep1Ip, ep2Ip, ep1IpV6, ep2IpV6, tests.GuestAgentHttpUrl)
agentVMI = tests.NewRandomVMIWithEphemeralDiskAndUserdata(tests.ContainerDiskFor(tests.ContainerDiskFedora), userdata)

agentVMI.Spec.Domain.Devices.Interfaces = interfaces
agentVMI.Spec.Networks = networks
Expand Down

0 comments on commit cbc88c4

Please sign in to comment.