|
23 | 23 |
|
24 | 24 | public class HostAllowlistOptionsTest extends CommandTestAbstract {
|
25 | 25 |
|
26 |
| - /** test deprecated CLI option * */ |
27 |
| - @Deprecated |
28 |
| - @Test |
29 |
| - public void rpcHttpHostWhitelistAcceptsSingleArgument() { |
30 |
| - parseCommand("--host-whitelist", "a"); |
31 |
| - |
32 |
| - verify(mockRunnerBuilder).jsonRpcConfiguration(jsonRpcConfigArgumentCaptor.capture()); |
33 |
| - verify(mockRunnerBuilder).build(); |
34 |
| - |
35 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist().size()).isEqualTo(1); |
36 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()).contains("a"); |
37 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()) |
38 |
| - .doesNotContain("localhost"); |
39 |
| - |
40 |
| - assertThat(commandOutput.toString(UTF_8)).isEmpty(); |
41 |
| - assertThat(commandErrorOutput.toString(UTF_8)).isEmpty(); |
42 |
| - } |
43 |
| - |
44 | 26 | @Test
|
45 | 27 | public void rpcHttpHostAllowlistAcceptsSingleArgument() {
|
46 | 28 | parseCommand("--host-allowlist", "a");
|
@@ -89,23 +71,6 @@ public void rpcHttpHostAllowlistAcceptsDoubleComma() {
|
89 | 71 | assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
|
90 | 72 | }
|
91 | 73 |
|
92 |
| - @Deprecated |
93 |
| - @Test |
94 |
| - public void rpcHttpHostWhitelistAllowlistAcceptsMultipleFlags() { |
95 |
| - parseCommand("--host-whitelist=a", "--host-allowlist=b"); |
96 |
| - |
97 |
| - verify(mockRunnerBuilder).jsonRpcConfiguration(jsonRpcConfigArgumentCaptor.capture()); |
98 |
| - verify(mockRunnerBuilder).build(); |
99 |
| - |
100 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist().size()).isEqualTo(2); |
101 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()).contains("a", "b"); |
102 |
| - assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()) |
103 |
| - .doesNotContain("*", "localhost"); |
104 |
| - |
105 |
| - assertThat(commandOutput.toString(UTF_8)).isEmpty(); |
106 |
| - assertThat(commandErrorOutput.toString(UTF_8)).isEmpty(); |
107 |
| - } |
108 |
| - |
109 | 74 | @Test
|
110 | 75 | public void rpcHttpHostAllowlistAcceptsMultipleFlags() {
|
111 | 76 | parseCommand("--host-allowlist=a", "--host-allowlist=b");
|
|
0 commit comments