ci: Support multi-node clusters
@@ -223,7 +223,7 @@ func TestBiolatency(t *testing.T) {
commands := []*command{
{
name: "Run biolatency gadget",
- cmd: "id=$($KUBECTL_GADGET profile block-io start --node $(kubectl get node --no-headers | cut -d' ' -f1)); sleep 15; $KUBECTL_GADGET profile block-io stop $id",
+ cmd: "id=$($KUBECTL_GADGET profile block-io start --node $(kubectl get node --no-headers | cut -d' ' -f1 | head -1)); sleep 15; $KUBECTL_GADGET profile block-io stop $id",
expectedRegexp: `usecs\s+:\s+count\s+distribution`,
},
}
@@ -659,7 +659,7 @@ func TestTcptop(t *testing.T) {
tcptopCmd := &command{
name: "Start tcptop gadget",
- cmd: fmt.Sprintf("$KUBECTL_GADGET top tcp --node $(kubectl get node --no-headers | cut -d' ' -f1) -n %s -p test-pod", ns),
+ cmd: fmt.Sprintf("$KUBECTL_GADGET top tcp -n %s", ns),
expectedRegexp: `wget`,
startAndStop: true,
}
