Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Use ip command for VPN segment - fix #1125 #1126

Merged
merged 16 commits into from
Feb 25, 2019
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
dritter committed Jan 22, 2019
commit 32d3216bde4c22721ba7e4cb7ff39f12b5f3b2a4
2 changes: 1 addition & 1 deletion test/segments/public_ip.spec
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function testPublicIpSegmentWithVPNTurnedOnOsx() {

# Fake ifconfig
cat > $FOLDER/sbin/ifconfig <<EOF
#!/bin/sh
#!/usr/bin/env zsh
cat <<INNER
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
Expand Down
4 changes: 2 additions & 2 deletions test/segments/vpn_ip.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function tearDown() {
function fakeIfconfig() {
# Fake ifconfig
cat > $FOLDER/sbin/ifconfig <<EOF
#!/bin/sh
#!/usr/bin/env zsh

if [[ "\$#" -gt 0 ]]; then
cat <<INNER
Expand Down Expand Up @@ -80,7 +80,7 @@ function fakeIp() {
local INTERFACE2="${2}"
[[ -z "${INTERFACE2}" ]] && INTERFACE2="disabled-if2"
cat > $FOLDER/sbin/ip <<EOF
#!/bin/sh
#!/usr/bin/env zsh

if [[ "\$*" == 'link ls up' ]]; then
cat <<INNER
Expand Down