Skip to main content
Version: v1.1.0

Testing

E2E Tests

meridio-e2e-kind-meridio

meridio-e2e-kind-tapa

meridio-e2e-kind-nsm

meridio-e2e-kind-ip-family

meridio-e2e-kind-kubernetes

(These reports are for the last 1000 test runs only)

Environment / Framework

Initial Deployment

The picture below shows the initial deployment that should be installed in a kubernetes cluster in order to execute the complete e2e test suite in dualstack. With only IPv4, elements containing v6 are not used, and with only IPv6, elements containing v4 are not used. Elements between [] are configurable via parameters, see the Configuration section.

Initial-Deployment-E2E

Configuration

NameTypeDescription
traffic-generator-cmdstringCommand to use to connect to the traffic generator. All occurences of '{trench}' will be replaced with the trench name.
scriptstringPath + script used by the e2e tests
skipstringSkip specific tests
focusstringFocus on specific tests
log-collector-enabledboolIs log collector enabled
ignore-lost-connectionsboolIf set to true, the tests will pass even if there is lost connections
k8s-namespacestringName of the namespace
target-a-deployment-namestringName of the target deployment
trench-astringName of the trench
attractor-a-1stringName of the attractor
conduit-a-1stringName of the conduit
stream-a-IstringName of the stream
stream-a-IIstringName of the stream
tcp-destination-port-0intDestination port 0
tcp-destination-port-1intDestination port 1 (tcp-destination-port-0 + 1)
tcp-destination-port-2intDestination port 2 (tcp-destination-port-1 + 1)
udp-destination-port-0intDestination port 0
vip-1-v4stringAddress of the vip v4 number 1
vip-1-v6stringAddress of the vip v6 number 1
target-b-deployment-namestringName of the target deployment
trench-bstringName of the trench
conduit-b-1stringName of the conduit
stream-b-IstringName of the stream
vip-2-v4stringAddress of the vip v4 number 2
vip-2-v6stringAddress of the vip v6 number 2
stream-a-IIIstringName of the stream
conduit-a-2stringName of the conduit
stream-a-IVstringName of the stream
vip-3-v4stringAddress of the vip v4 number 3
vip-3-v6stringAddress of the vip v6 number 3
conduit-a-3stringName of the conduit
tcp-destination-port-nat-0intDestination port natted 0
stateless-lb-fe-deployment-name-attractor-a-1stringName of stateless-lb-fe deployment in attractor-a-1
stateless-lb-fe-deployment-name-attractor-b-1stringName of stateless-lb-fe deployment in attractor-b-1
stateless-lb-fe-deployment-name-attractor-a-2stringName of stateless-lb-fe deployment in attractor-a-2
stateless-lb-fe-deployment-name-attractor-a-3stringName of stateless-lb-fe deployment in attractor-a-3
ip-familystringIP Family

For more details about each parameter, check the picture above in the Initial Deployment section.

Script

A bash script file must be passed as parameter of the e2e tests. The script is required to allowed the e2e tests to be run in every environment (Helm/Operator deployement...). The following functions has to be implemented in the script:

NameDescription
init () errorExecuted once before running the tests
end () errorExecuted once after running the tests
on_failure () errorExecuted on failure
delete_create_trenchExecuted just before running the delete-create-trench test
delete_create_trench_revertExecuted just before running the delete-create-trench test and after the delete_create_trench script
new_vip () errorExecuted just before running the new-vip test
new_vip_revert () errorExecuted just after running the new-vip test
new_stream () errorExecuted just before running the new-stream test
new_stream_revert () errorExecuted just after running the new-stream test
stream_max_targets () errorExecuted just before running the stream-max-targets test
stream_max_targets_revert () errorExecuted just after running the stream-max-targets test
new_flow () errorExecuted just before running the new-flow test
new_flow_revert () errorExecuted just after running the new-flow test
flow_priority () errorExecuted just before running the flow-priority test
flow_priority_revert () errorExecuted just after running the flow-priority test
flow_destination_ports_range () errorExecuted just before running the flow-destination-ports-range test
flow_destination_ports_range_revert () errorExecuted just after running the flow-destination-ports-range test
flow_byte_matches () errorExecuted just after running the flow-byte-matches test
flow_byte_matches_revert () errorExecuted just after running the flow-byte-matches test
new_attractor_nsm_vlan () errorExecuted just before running the new-attractor-nsm-vlan test
new_attractor_nsm_vlan_revert () errorExecuted just after running the new-attractor-nsm-vlan test
conduit_destination_port_nats () errorExecuted just before running the conduit-destination-port-nats test
conduit_destination_port_nats_revert () errorExecuted just after running the conduit-destination-port-nats test

List of tests

NameTypeDescription
TCP-IPv4IngressTrafficSend TCP traffic in trench-a with vip-1-v4 as destination IP and tcp-destination-port-0 as destination port
TCP-IPv6IngressTrafficSend TCP traffic in trench-a with vip-1-v6 as destination IP and tcp-destination-port-0 as destination port
UDP-IPv4IngressTrafficSend UDP traffic in trench-a with vip-1-v4 as destination IP and udp-destination-port-0 as destination port
UDP-IPv6IngressTrafficSend UDP traffic in trench-a with vip-1-v6 as destination IP and udp-destination-port-0 as destination port
MT-SwitchMultiTrenchesDisconnect a target from target-a-deployment-name from trench-a and connect it to trench-b
MT-ParallelMultiTrenchesSend traffic in trench-a and trench-b at the same time
Scale-DownScalingScale down target-a-deployment-name
Scale-UpScalingScale up target-a-deployment-name
close-openTAPAClose stream-a-I in one of the target from target-a-deployment-name and re-open it
open-second-streamTAPAOpen stream-a-II in one of the target from target-a-deployment-name and close it
open-second-stream-second-conduitTAPAOpen stream-a-IV in one of the target from target-a-deployment-name and close it
delete-create-trenchTrenchDelete trench-a and recreate and reconfigure it
new-vipVipConfigure vip-2-v4 and vip-2-v6 in flow-a-z-tcp and attractor-a-1
new-streamStreamConfigure stream-a-III in conduit-a-1 with a new flow with tcp, tcp-destination-port-2 as destination port and vip-1-v4 and vip-1-v6
stream-max-targetsStreamConfigure stream-a-III as in new-stream test with the max-targets field set to 1 and 2 targets with stream-a-III opened
new-flowFlowConfigure a new flow with tcp, tcp-destination-port-2 as destination port and vip-1-v4 and vip-1-v6 in stream-a-I
flow-priorityFlowSet priority to 3 and add tcp-destination-port-1 as destination port in flow-a-z-tcp
flow-destination-ports-rangeFlowSet priority to 3 and set 'tcp-destination-port-0'-'tcp-destination-port-2' as destination port in flow-a-z-tcp
flow-byte-matchesFlowAdd tcp-destination-port-2 to destination ports of flow-a-z-tcp and add a byte-match to allow only tcp-destination-port-2
new-attractor-nsm-vlanAttractorConfigure a new attractor with new vips vip-2-v4 and vip-2-v6, gateways, conduit conduit-a-3, stream stream-a-III and flow with tcp and tcp-destination-port-0 as destination port
conduit-destination-port-natsConduitConfigure flow-a-z-tcp with tcp-destination-port-nat-0 as destination port and conduit-a-1 with a port nat with tcp-destination-port-nat-0 as port and tcp-destination-port-0 as target-port

Steps

Kind + Helm

  1. Deploy environment (Kind + Gateways + NSM + Spire) and Meridio (trench-a + trench-b + target-a + target-b)
make -s -C test/e2e/environment/kind-helm/ KUBERNETES_VERSION=v1.25 NSM_VERSION=v1.6.1 KUBERNETES_IP_FAMILY=dualstack KUBERNETES_WORKERS=2
  1. Run e2e tests
make e2e
  1. Uninstall environment
make -s -C docs/demo/scripts/kind/ clean

Kind + Operator

  1. Deploy environment (Kind + Gateways + NSM + Spire) and Meridio (operator + trench-a + trench-b + target-a + target-b)
make -s -C test/e2e/environment/kind-operator/ KUBERNETES_VERSION=v1.26 NSM_VERSION=v1.6.1 IP_FAMILY=dualstack KUBERNETES_WORKERS=2
  1. Run e2e tests
make e2e E2E_ENVIRONMENT="kind-operator"
  1. Uninstall environment
make -s -C docs/demo/scripts/kind/ clean