aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kud/tests')
-rwxr-xr-xkud/tests/_functions.sh4
-rwxr-xr-xkud/tests/plugin_fw_v2.sh18
-rw-r--r--kud/tests/plugin_fw_v2.yaml19
3 files changed, 24 insertions, 17 deletions
diff --git a/kud/tests/_functions.sh b/kud/tests/_functions.sh
index 1a803173..ec415409 100755
--- a/kud/tests/_functions.sh
+++ b/kud/tests/_functions.sh
@@ -14,7 +14,11 @@ set -o pipefail
FUNCTIONS_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
+# Do not overwrite any user modifications to PATH when sourcing
+# /etc/environment
+USER_PATH=$PATH
source /etc/environment
+PATH=$USER_PATH:$PATH
source $FUNCTIONS_DIR/_common_test.sh
function print_msg {
diff --git a/kud/tests/plugin_fw_v2.sh b/kud/tests/plugin_fw_v2.sh
index d6254ac3..abab9004 100755
--- a/kud/tests/plugin_fw_v2.sh
+++ b/kud/tests/plugin_fw_v2.sh
@@ -14,10 +14,10 @@ set -o pipefail
source _common_test.sh
source _functions.sh
-source _functions.sh
# TODO KUBECONFIG may be a list of paths
-kubeconfig_path="${KUBECONFIG:-$HOME/.kube/config}"
+KUBECONFIG_PATH="${KUBECONFIG:-$HOME/.kube/config}"
+DEMO_FOLDER="${DEMO_FOLDER:-$test_folder/../demo}"
clusters="${KUD_PLUGIN_FW_CLUSTERS:-$(cat <<EOF
[
@@ -28,7 +28,7 @@ clusters="${KUD_PLUGIN_FW_CLUSTERS:-$(cat <<EOF
"userData1": "edge01 user data 1",
"userData2": "edge01 user data 2"
},
- "file": "$kubeconfig_path"
+ "file": "$KUBECONFIG_PATH"
}
]
EOF
@@ -73,17 +73,15 @@ service_host=${service_host:-"localhost"}
CSAR_DIR="/opt/csar"
csar_id="4bf66240-a0be-4ce2-aebd-a01df7725f16"
-demo_folder=$test_folder/../demo
-
function populate_CSAR_compositevfw_helm {
_checks_args "$1"
pushd "${CSAR_DIR}/$1"
print_msg "Create Helm Chart Archives for compositevfw"
rm -f *.tar.gz
- tar -czf packetgen.tar.gz -C $demo_folder/composite-firewall packetgen
- tar -czf firewall.tar.gz -C $demo_folder/composite-firewall firewall
- tar -czf sink.tar.gz -C $demo_folder/composite-firewall sink
- tar -czf profile.tar.gz -C $demo_folder/composite-firewall manifest.yaml override_values.yaml
+ tar -czf packetgen.tar.gz -C $DEMO_FOLDER/composite-firewall packetgen
+ tar -czf firewall.tar.gz -C $DEMO_FOLDER/composite-firewall firewall
+ tar -czf sink.tar.gz -C $DEMO_FOLDER/composite-firewall sink
+ tar -czf profile.tar.gz -C $DEMO_FOLDER/composite-firewall manifest.yaml override_values.yaml
popd
}
@@ -228,7 +226,7 @@ else
for name in $(cluster_names); do
print_msg "Wait for all pods to start on cluster $name"
file=$(cluster_file "$name")
- KUBECONFIG=$file kubectl wait pod -l release=fw0 --for=condition=Ready
+ KUBECONFIG=$file kubectl wait pod -l release=fw0 --for=condition=Ready --timeout=5m
done
# TODO: Provide some health check to verify vFW work
print_msg "Not waiting for vFW to fully install as no further checks are implemented in testcase"
diff --git a/kud/tests/plugin_fw_v2.yaml b/kud/tests/plugin_fw_v2.yaml
index be436106..b4dbf77f 100644
--- a/kud/tests/plugin_fw_v2.yaml
+++ b/kud/tests/plugin_fw_v2.yaml
@@ -234,7 +234,7 @@ metadata:
spec:
application-name: packetgen
workload-resource: {{.Release}}-packetgen
- type: Deployment
+ type: VirtualMachine
---
version: emco/v2
@@ -245,7 +245,7 @@ metadata:
spec:
application-name: firewall
workload-resource: {{.Release}}-firewall
- type: Deployment
+ type: VirtualMachine
---
version: emco/v2
@@ -265,10 +265,11 @@ resourceContext:
metadata:
name: packetgen_unprotected_if
spec:
- interface: eth1
+ interface: net1
name: {{.UnprotectedProviderNetwork}}
defaultGateway: "false"
ipAddress: 192.168.10.2
+ macAddress: ee:f0:75:e0:b6:26
---
version: emco/v2
@@ -277,10 +278,11 @@ resourceContext:
metadata:
name: packetgen_emco_if
spec:
- interface: eth2
+ interface: net2
name: {{.EmcoProviderNetwork}}
defaultGateway: "false"
ipAddress: 10.10.20.2
+ macAddress: 0a:c0:37:55:f5:ab
---
version: emco/v2
@@ -289,10 +291,11 @@ resourceContext:
metadata:
name: firewall_unprotected_if
spec:
- interface: eth1
+ interface: net1
name: {{.UnprotectedProviderNetwork}}
defaultGateway: "false"
ipAddress: 192.168.10.3
+ macAddress: 52:57:2b:7b:e4:27
---
version: emco/v2
@@ -301,10 +304,11 @@ resourceContext:
metadata:
name: firewall_protected_if
spec:
- interface: eth2
+ interface: net2
name: {{.ProtectedNetwork}}
defaultGateway: "false"
ipAddress: 192.168.20.2
+ macAddress: fa:d1:3a:a1:5c:67
---
version: emco/v2
@@ -313,10 +317,11 @@ resourceContext:
metadata:
name: firewall_emco_if
spec:
- interface: eth3
+ interface: net3
name: {{.EmcoProviderNetwork}}
defaultGateway: "false"
ipAddress: 10.10.20.3
+ macAddress: 86:31:ea:6a:ce:75
---
version: emco/v2