-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from floork/agent-url-property
feat(agent): redacted url
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,13 @@ def test_agent_url_and_management_url() -> None: | |
url="amqps://test.invalid", | ||
management_url="amqps://test.invalid", | ||
) | ||
|
||
|
||
def test_agent_redacted_url() -> None: | ||
agent = Agent(token="test", url="amqps://user:[email protected]") | ||
assert agent.url == "amqps://user:******@test.invalid" | ||
|
||
|
||
def test_agent_redacted_url_no_login_info() -> None: | ||
agent = Agent(token="test", url="amqps://test.invalid") | ||
assert agent.url == "amqps://test.invalid" |