Skip to content

Commit

Permalink
Merge pull request #156 from maiqueb/disable-cni-check-cmd
Browse files Browse the repository at this point in the history
e2e tests: fix currently broken setup on kind clusters
  • Loading branch information
dougbtv authored Oct 21, 2021
2 parents ebcf63f + 876f0a2 commit 7e39872
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
uses: actions/checkout@v2

- name: Install requirements
run: sudo apt-get install nmap jq
run: sudo apt-get install nmap jq && ./hack/build-go.sh

- name: Get tools, setup KinD cluster test environment
run: source hack/e2e-get-test-tools.sh && ./hack/e2e-setup-kind-cluster.sh --number-of-compute $NUMBER_OF_COMPUTE_NODES
Expand Down
33 changes: 21 additions & 12 deletions hack/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,23 @@ metadata:
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "$TEST_INTERFACE_NAME",
"mode": "bridge",
"ipam": {
"type": "whereabouts",
"leader_lease_duration": $LEADER_LEASE_DURATION,
"leader_renew_deadline": $LEADER_RENEW_DEADLINE,
"leader_retry_period": $LEADER_RETRY_PERIOD,
"range": "$1",
"log_level": "debug",
"log_file": "/tmp/wb"
}
"disableCheck": true,
"plugins": [
{
"type": "macvlan",
"master": "$TEST_INTERFACE_NAME",
"mode": "bridge",
"ipam": {
"type": "whereabouts",
"leader_lease_duration": $LEADER_LEASE_DURATION,
"leader_renew_deadline": $LEADER_RENEW_DEADLINE,
"leader_retry_period": $LEADER_RETRY_PERIOD,
"range": "$1",
"log_level": "debug",
"log_file": "/tmp/wb"
}
}
]
}'
EOF
}
Expand Down Expand Up @@ -202,6 +207,10 @@ is_ippool_consistent() {
local pod_ips
local resolved_ippool_ip
local exit_code=0

echo "Forcing reconciliation of the cluster ..."
bin/ip-reconciler -kubeconfig="${HOME}"/.kube/config

ippool_keys=($(kubectl get ippool $pool_name --namespace $pool_namespace --output json \
| jq --raw-output '.spec.allocations|to_entries |map("\(.key)")| .[]'))
ips=($(nmap -sL -n $range | awk '/Nmap scan report for/{printf "%s ", $NF}'))
Expand Down

0 comments on commit 7e39872

Please sign in to comment.