Skip to content

Commit a629c40

Browse files
authored
Remove spurious code in xk6-disruptor examples (#1247)
Signed-off-by: Pablo Chacin <[email protected]>
1 parent 628f9c4 commit a629c40

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ export default function () {
3030
select: { labels: { "app.kubernetes.io/name": "my-app" } },
3131
});
3232

33-
// Check that there is at least one target
34-
const targets = disruptor.targets();
35-
if (targets.length === 0) {
36-
throw new Error("expected list to have one target");
37-
}
38-
3933
// Disrupt the targets by injecting HTTP faults into them for 30 seconds
4034
const fault = {
4135
averageDelay: 500,

src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ const fault = {
4343

4444
export default function () {
4545
const disruptor = new PodDisruptor(selector);
46-
const targets = disruptor.targets();
47-
if (targets.length != 1) {
48-
throw new Error('expected list to have one target');
49-
}
50-
5146
disruptor.injectHTTPFaults(fault, '30s');
5247
}
5348
```

src/data/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ const fault = {
3333

3434
export default function () {
3535
const disruptor = new ServiceDisruptor('nginx', 'default');
36-
const targets = disruptor.targets();
37-
if (targets.length != 1) {
38-
throw new Error('expected list to have one target');
39-
}
40-
4136
disruptor.injectHTTPFaults(fault, '30s');
4237
}
4338
```

0 commit comments

Comments
 (0)