-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathredactions.yaml
52 lines (52 loc) · 1.64 KB
/
redactions.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
doc: |
Some redaction examples.
bindings:
'?X_NEVERSAY': 'I love crêpes.'
spec:
phases:
phase1:
steps:
- '$include<include/mock.yaml>'
- pub:
doc: |
A parameter starting with X_ will have its value
redacted.
payload: '{"do not say it":"?X_NEVERSAY"}'
- recv:
pattern: '{"do not say it":"?*x"}'
doc: |
We can't test what we get in logging output, but we can
verify that our redaction did not mess up test
execution.
guard: |
return 0 < bs['?*x'].indexOf("crêpes")
- run: |
redactRegexp('[nN]i!');
- pub:
doc: |
Use the redaction regexp above.
payload: '"We shall say \"ni!\" again to you if you do not appease us."'
- recv:
pattern: '"?*x"'
guard: |
return 0 < bs['?*x'].indexOf("ni!")
- run: |
redactRegexp('love (really thin pancakes)');
- pub:
doc: |
Use the previous regexp that has a group.
payload: '"I love really thin pancakes."'
- recv:
pattern: '"?*x"'
guard: |
return 0 < bs['?*x'].indexOf("pancakes")
- run: |
redactRegexp('love (really thin pancakes)');
- pub:
doc: |
Use the previous regexp that has a group. Suppress output.
payload: '"I love really thin pancakes."'
- recv:
pattern: '"?*x"'
guard: |
return 0 < bs['?*x'].indexOf("pancakes")