Skip to content

Commit

Permalink
Remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Jul 24, 2024
1 parent 82933e6 commit e2cba56
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions tests/api2/test_ip_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@


@pytest.mark.parametrize("url", ["127.0.0.1", "127.0.0.1:6000"])
@pytest.mark.parametrize("root", [True, False])
def test_tcp_connection_from_localhost(url, root):
def test_tcp_connection_from_localhost(url):
cmd = f"midclt -u ws://{url}/websocket call auth.sessions '[[\"current\", \"=\", true]]' '{{\"get\": true}}'"
if root:
assert json.loads(ssh(cmd))["credentials"] == "ROOT_TCP_SOCKET"
else:
with user({
"username": "unprivileged",
"full_name": "Unprivileged User",
"group_create": True,
"password": "test1234",
}):
result = ssh(f"sudo -u unprivileged {cmd}", check=False, complete_response=True)
assert "Not authenticated" in result["stderr"]
with user({
"username": "unprivileged",
"full_name": "Unprivileged User",
"group_create": True,
"password": "test1234",
}):
result = ssh(f"sudo -u unprivileged {cmd}", check=False, complete_response=True)
assert "Not authenticated" in result["stderr"]

0 comments on commit e2cba56

Please sign in to comment.