Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Allow dashes in ethstats password #5090

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@Value.Immutable
public interface NetstatsUrl {

Pattern NETSTATS_URL_REGEX = Pattern.compile("([-\\w]+):([\\w]+)?@([-.\\w]+)(:([\\d]+))?");
Pattern NETSTATS_URL_REGEX = Pattern.compile("([-\\w]+):([-\\w]+)?@([-.\\w]+)(:([\\d]+))?");

String getNodeName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

public class NetstatsUrlTest {

private final String VALID_NETSTATS_URL = "Dev-Node-1:[email protected]:3001";
private final String VALID_NETSTATS_URL = "Dev-Node-1:secret-with-dashes@127.0.0.1:3001";

private final String CONTACT = "[email protected]";

Expand All @@ -34,7 +34,7 @@ public void buildWithValidParams() {
assertThat(netstatsUrl.getHost()).isEqualTo("127.0.0.1");
assertThat(netstatsUrl.getNodeName()).isEqualTo("Dev-Node-1");
assertThat(netstatsUrl.getPort()).isEqualTo(3001);
assertThat(netstatsUrl.getSecret()).isEqualTo("secret");
assertThat(netstatsUrl.getSecret()).isEqualTo("secret-with-dashes");
assertThat(netstatsUrl.getContact()).isEqualTo(CONTACT);
}

Expand Down