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

[Test] Service Accounts - Remove colon from invalid token name generator #71099

Merged
merged 1 commit into from
Mar 31, 2021
Merged
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
@@ -130,6 +130,11 @@ public void close() {
secret.close();
}

@Override
public String toString() {
return getQualifiedName();
}
Comment on lines +133 to +136
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure we had this method previously but somehow it seemed to be lost in between rebases refactors, rebases and merges.


@Override
public boolean equals(Object o) {
if (this == o)
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ public class ServiceAccountTokenTests extends ESTestCase {
);

private static final Set<Character> INVALID_TOKEN_NAME_CHARS = Set.of(
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[',
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '.', '/', ';', '<', '=', '>', '?', '@', '[',
'\\', ']', '^', '`', '{', '|', '}', '~', ' ', '\t', '\n', '\r');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a newline have a similar parsing issue in this test?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I just realised it's not file parsing it's the new token format. So, to answer my question, "No, newline will fail in the expected way".


public void testIsValidTokenName() {