From 9eb002928e01ff55c969e8ae5ab2fa4e58c08f53 Mon Sep 17 00:00:00 2001 From: Pablo Chacin Date: Wed, 5 Jul 2023 15:00:32 +0200 Subject: [PATCH] Remove spurious code in xk6-disruptor examples Signed-off-by: Pablo Chacin --- .../docs/40 xk6-disruptor/01 Get started/01 Welcome.md | 6 ------ .../docs/40 xk6-disruptor/03 API/02 PodDisruptor.md | 5 ----- .../docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md | 5 ----- 3 files changed, 16 deletions(-) diff --git a/src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md b/src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md index 7b53fdb42f..edd1e1c6ab 100644 --- a/src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md +++ b/src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md @@ -30,12 +30,6 @@ export default function () { select: { labels: { "app.kubernetes.io/name": "my-app" } }, }); - // Check that there is at least one target - const targets = disruptor.targets(); - if (targets.length === 0) { - throw new Error("expected list to have one target"); - } - // Disrupt the targets by injecting HTTP faults into them for 30 seconds const fault = { averageDelay: 500, diff --git a/src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor.md b/src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor.md index 07cd6e1922..518b526b60 100644 --- a/src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor.md +++ b/src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor.md @@ -43,11 +43,6 @@ const fault = { export default function () { const disruptor = new PodDisruptor(selector); - const targets = disruptor.targets(); - if (targets.length != 1) { - throw new Error('expected list to have one target'); - } - disruptor.injectHTTPFaults(fault, '30s'); } ``` diff --git a/src/data/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md b/src/data/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md index 6d148b279a..783da2e354 100644 --- a/src/data/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md +++ b/src/data/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md @@ -33,11 +33,6 @@ const fault = { export default function () { const disruptor = new ServiceDisruptor('nginx', 'default'); - const targets = disruptor.targets(); - if (targets.length != 1) { - throw new Error('expected list to have one target'); - } - disruptor.injectHTTPFaults(fault, '30s'); } ```