Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
test(octopus): normalize integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Mai authored and guangbochen committed Jul 6, 2020
1 parent b2ef11c commit 1d0fce6
Show file tree
Hide file tree
Showing 9 changed files with 766 additions and 638 deletions.
8 changes: 3 additions & 5 deletions hack/lib/cluster-k3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,9 @@ function octopus::cluster_k3d::add_worker() {
octopus::log::error "node name is required"
fi

# NB(thxCode) The container will not exit automatically when `kubectl delete node ...`
idx=${node_name//edge-worker/}
((idx += 1))
if docker inspect "k3d-edge-worker-${idx}" >/dev/null 2>&1; then
docker rm -f "k3d-edge-worker-${idx}" >/dev/null 2>&1
octopus::log::info "validating node ${node_name} is not existed"
if kubectl get node "${node_name}" >/dev/null 2>&1; then
octopus::log::fatal "${node_name} node is existed"
fi

octopus::log::info "adding new node to ${CLUSTER_NAME} cluster"
Expand Down
Loading

0 comments on commit 1d0fce6

Please sign in to comment.