Added the tag [auth] for tests that need authentication.
This commit is contained in:
parent
3705ae8d78
commit
f24fae28e9
@ -226,8 +226,9 @@ cmake options:
|
||||
* `-DWITH_EXAMPLES=YES` if you want to compile the examples
|
||||
* `-DWITH_TESTS=YES` if you want to compile the tests
|
||||
* `-DEXTRA_TEST_ARGS` to run only some tests
|
||||
* Possible values: `[api]`, `[mastodon]`, `[glitch-soc]`, `[pleroma]`, `[upload]`
|
||||
* Example: `-DEXTRA_TEST_ARGS=[pleroma]![mastodon]` to run the tests for
|
||||
* Possible tags: `[api]`, `[auth]`, `[mastodon]`, `[glitch-soc]`,
|
||||
`[pleroma]`, `[upload]`
|
||||
* Example: `-DEXTRA_TEST_ARGS='[pleroma]![mastodon]'` to run the tests for
|
||||
features in Pleroma that are not in Mastodon.
|
||||
* `[upload]` tags tests that upload files.
|
||||
* `-DWITH_DOC=NO` if you don't want to compile the HTML reference
|
||||
@ -241,7 +242,7 @@ Install with `make install`.
|
||||
|
||||
You can run the tests with `ctest` inside the build directory. You need to set
|
||||
the environment variable `MASTODON_CPP_ACCESS_TOKEN` to an access token with the
|
||||
scopes *read*, *write* and *follow* for some tests.
|
||||
scopes *read*, *write* and *follow* for tests tagged with `[auth]`.
|
||||
You can select the instance to use with `MASTODON_CPP_INSTANCE`, the default is
|
||||
*likeable.space*. You can select the user ID with `MASTODON_CPP_USER_ID`, the
|
||||
default is *9hnrrVPriLiLVAhfVo*. You can select the status ID with
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/block can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/follow can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/followers can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/following can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/lists can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/pin can be called successfully",
|
||||
"[api][mastodon][glitch-soc]")
|
||||
"[api][auth][mastodon][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/statuses can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/unblock can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/unfollow can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/unpin can be called successfully",
|
||||
"[api][mastodon][glitch-soc]")
|
||||
"[api][auth][mastodon][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/relationships can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/search can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/update_credentials can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/verify_credentials can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/apps/verify_credentials can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/blocks can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/domain_blocks can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/endorsements can be called successfully",
|
||||
"[api][mastodon][glitch-soc]")
|
||||
"[api][auth][mastodon][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/favourites can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/filters can be called successfully",
|
||||
"[api][mastodon][glitch-soc]")
|
||||
"[api][auth][mastodon][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/filters/:id can be called successfully",
|
||||
"[api][mastodon][glitch-soc]")
|
||||
"[api][auth][mastodon][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/follow_requests can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/follow_requests/:id/authorize can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/follow_requests/:id/reject can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/lists can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/lists/:id can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/lists/:id/accounts can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/media can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc][upload]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc][upload]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -27,7 +27,7 @@ using namespace Mastodon;
|
||||
// We use a media attachment that is attached to a status, therefore we get an
|
||||
// error.
|
||||
SCENARIO ("/api/v1/media/:id can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/favourite can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/accounts/:id/unfavourite can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/suggestions can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
using namespace Mastodon;
|
||||
|
||||
SCENARIO ("/api/v1/suggestions/:accountid can be called successfully",
|
||||
"[api][mastodon][pleroma][glitch-soc]")
|
||||
"[api][auth][mastodon][pleroma][glitch-soc]")
|
||||
{
|
||||
REQUIRE (access_token != nullptr);
|
||||
|
||||
|
Reference in New Issue
Block a user