mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-06 12:51:42 +02:00
Add "General.GetRPCCommands" RPC command
This commit is contained in:
parent
6b94392f2c
commit
f264080c77
7 changed files with 106 additions and 20 deletions
|
@ -697,7 +697,7 @@ TEST_CASE("Auth")
|
|||
AuthInfo auth(settings);
|
||||
auto ec = auth.authenticateBasic(base64_encode("badaix:secret"));
|
||||
REQUIRE(!ec);
|
||||
REQUIRE(auth.hasAuthInfo());
|
||||
REQUIRE(auth.isAuthenticated());
|
||||
REQUIRE(auth.hasPermission("stream"));
|
||||
}
|
||||
|
||||
|
@ -710,7 +710,7 @@ TEST_CASE("Auth")
|
|||
AuthInfo auth(settings);
|
||||
auto ec = auth.authenticateBasic(base64_encode("badaix:secret"));
|
||||
REQUIRE(!ec);
|
||||
REQUIRE(auth.hasAuthInfo());
|
||||
REQUIRE(auth.isAuthenticated());
|
||||
REQUIRE(!auth.hasPermission("stream"));
|
||||
}
|
||||
|
||||
|
@ -722,12 +722,12 @@ TEST_CASE("Auth")
|
|||
AuthInfo auth(settings);
|
||||
auto ec = auth.authenticateBasic(base64_encode("badaix:wrong_password"));
|
||||
REQUIRE(ec == AuthErrc::wrong_password);
|
||||
REQUIRE(!auth.hasAuthInfo());
|
||||
REQUIRE(!auth.isAuthenticated());
|
||||
REQUIRE(!auth.hasPermission("stream"));
|
||||
|
||||
ec = auth.authenticateBasic(base64_encode("unknown_user:secret"));
|
||||
REQUIRE(ec == AuthErrc::unknown_user);
|
||||
REQUIRE(!auth.hasAuthInfo());
|
||||
REQUIRE(!auth.isAuthenticated());
|
||||
REQUIRE(!auth.hasPermission("stream"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue