diff --git a/README.md b/README.md index 07277dc..99b4c8c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tests/test_api_v1_accounts_id_block.cpp b/tests/test_api_v1_accounts_id_block.cpp index f7944a1..7f2622e 100644 --- a/tests/test_api_v1_accounts_id_block.cpp +++ b/tests/test_api_v1_accounts_id_block.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_follow.cpp b/tests/test_api_v1_accounts_id_follow.cpp index 499bc44..7cc3e7f 100644 --- a/tests/test_api_v1_accounts_id_follow.cpp +++ b/tests/test_api_v1_accounts_id_follow.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_followers.cpp b/tests/test_api_v1_accounts_id_followers.cpp index dc74db0..1cf47e6 100644 --- a/tests/test_api_v1_accounts_id_followers.cpp +++ b/tests/test_api_v1_accounts_id_followers.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_following.cpp b/tests/test_api_v1_accounts_id_following.cpp index 42d0e31..e43a34a 100644 --- a/tests/test_api_v1_accounts_id_following.cpp +++ b/tests/test_api_v1_accounts_id_following.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_lists.cpp b/tests/test_api_v1_accounts_id_lists.cpp index a6fb7bb..459fbf1 100644 --- a/tests/test_api_v1_accounts_id_lists.cpp +++ b/tests/test_api_v1_accounts_id_lists.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_pin.cpp b/tests/test_api_v1_accounts_id_pin.cpp index a91c512..eecfc76 100644 --- a/tests/test_api_v1_accounts_id_pin.cpp +++ b/tests/test_api_v1_accounts_id_pin.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_statuses.cpp b/tests/test_api_v1_accounts_id_statuses.cpp index d83160b..40b4095 100644 --- a/tests/test_api_v1_accounts_id_statuses.cpp +++ b/tests/test_api_v1_accounts_id_statuses.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_unblock.cpp b/tests/test_api_v1_accounts_id_unblock.cpp index 381971b..39fd29f 100644 --- a/tests/test_api_v1_accounts_id_unblock.cpp +++ b/tests/test_api_v1_accounts_id_unblock.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_unfollow.cpp b/tests/test_api_v1_accounts_id_unfollow.cpp index 95e52d6..f084444 100644 --- a/tests/test_api_v1_accounts_id_unfollow.cpp +++ b/tests/test_api_v1_accounts_id_unfollow.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_id_unpin.cpp b/tests/test_api_v1_accounts_id_unpin.cpp index 3481d86..3f1a742 100644 --- a/tests/test_api_v1_accounts_id_unpin.cpp +++ b/tests/test_api_v1_accounts_id_unpin.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_relationships.cpp b/tests/test_api_v1_accounts_relationships.cpp index 7b48c56..0bdd3b0 100644 --- a/tests/test_api_v1_accounts_relationships.cpp +++ b/tests/test_api_v1_accounts_relationships.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_search.cpp b/tests/test_api_v1_accounts_search.cpp index 40d0ec7..4622e87 100644 --- a/tests/test_api_v1_accounts_search.cpp +++ b/tests/test_api_v1_accounts_search.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_update_credentials.cpp b/tests/test_api_v1_accounts_update_credentials.cpp index 4688510..b809b6b 100644 --- a/tests/test_api_v1_accounts_update_credentials.cpp +++ b/tests/test_api_v1_accounts_update_credentials.cpp @@ -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); diff --git a/tests/test_api_v1_accounts_verify_credentials.cpp b/tests/test_api_v1_accounts_verify_credentials.cpp index f721233..855c296 100644 --- a/tests/test_api_v1_accounts_verify_credentials.cpp +++ b/tests/test_api_v1_accounts_verify_credentials.cpp @@ -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); diff --git a/tests/test_api_v1_apps_verify_credentials.cpp b/tests/test_api_v1_apps_verify_credentials.cpp index 773c92f..639b2cc 100644 --- a/tests/test_api_v1_apps_verify_credentials.cpp +++ b/tests/test_api_v1_apps_verify_credentials.cpp @@ -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); diff --git a/tests/test_api_v1_blocks.cpp b/tests/test_api_v1_blocks.cpp index 695a0dd..4ccd2b2 100644 --- a/tests/test_api_v1_blocks.cpp +++ b/tests/test_api_v1_blocks.cpp @@ -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); diff --git a/tests/test_api_v1_domain_blocks.cpp b/tests/test_api_v1_domain_blocks.cpp index 6081d7f..64a4810 100644 --- a/tests/test_api_v1_domain_blocks.cpp +++ b/tests/test_api_v1_domain_blocks.cpp @@ -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); diff --git a/tests/test_api_v1_endorsements.cpp b/tests/test_api_v1_endorsements.cpp index 7e82b97..3eeaf21 100644 --- a/tests/test_api_v1_endorsements.cpp +++ b/tests/test_api_v1_endorsements.cpp @@ -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); diff --git a/tests/test_api_v1_favourites.cpp b/tests/test_api_v1_favourites.cpp index 65bde0a..f8b6123 100644 --- a/tests/test_api_v1_favourites.cpp +++ b/tests/test_api_v1_favourites.cpp @@ -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); diff --git a/tests/test_api_v1_filters.cpp b/tests/test_api_v1_filters.cpp index 6a5e5c4..d08e3bc 100644 --- a/tests/test_api_v1_filters.cpp +++ b/tests/test_api_v1_filters.cpp @@ -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); diff --git a/tests/test_api_v1_filters_id.cpp b/tests/test_api_v1_filters_id.cpp index d5e8474..390e3d9 100644 --- a/tests/test_api_v1_filters_id.cpp +++ b/tests/test_api_v1_filters_id.cpp @@ -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); diff --git a/tests/test_api_v1_follow_requests.cpp b/tests/test_api_v1_follow_requests.cpp index a1a13ad..187e451 100644 --- a/tests/test_api_v1_follow_requests.cpp +++ b/tests/test_api_v1_follow_requests.cpp @@ -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); diff --git a/tests/test_api_v1_follow_requests_authorize.cpp b/tests/test_api_v1_follow_requests_authorize.cpp index a91e02f..3e2f486 100644 --- a/tests/test_api_v1_follow_requests_authorize.cpp +++ b/tests/test_api_v1_follow_requests_authorize.cpp @@ -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); diff --git a/tests/test_api_v1_follow_requests_reject.cpp b/tests/test_api_v1_follow_requests_reject.cpp index 420fce6..ab11c36 100644 --- a/tests/test_api_v1_follow_requests_reject.cpp +++ b/tests/test_api_v1_follow_requests_reject.cpp @@ -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); diff --git a/tests/test_api_v1_lists.cpp b/tests/test_api_v1_lists.cpp index 9d31e9d..1e79e9f 100644 --- a/tests/test_api_v1_lists.cpp +++ b/tests/test_api_v1_lists.cpp @@ -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); diff --git a/tests/test_api_v1_lists_id.cpp b/tests/test_api_v1_lists_id.cpp index 5b054b9..ebd35ca 100644 --- a/tests/test_api_v1_lists_id.cpp +++ b/tests/test_api_v1_lists_id.cpp @@ -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); diff --git a/tests/test_api_v1_lists_id_accounts.cpp b/tests/test_api_v1_lists_id_accounts.cpp index 6b83a6e..9ceec14 100644 --- a/tests/test_api_v1_lists_id_accounts.cpp +++ b/tests/test_api_v1_lists_id_accounts.cpp @@ -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); diff --git a/tests/test_api_v1_media.cpp b/tests/test_api_v1_media.cpp index b00f8d4..da517dc 100644 --- a/tests/test_api_v1_media.cpp +++ b/tests/test_api_v1_media.cpp @@ -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); diff --git a/tests/test_api_v1_media_id.cpp b/tests/test_api_v1_media_id.cpp index d065606..ef8caf0 100644 --- a/tests/test_api_v1_media_id.cpp +++ b/tests/test_api_v1_media_id.cpp @@ -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); diff --git a/tests/test_api_v1_statuses_id_favourite.cpp b/tests/test_api_v1_statuses_id_favourite.cpp index 79a6cc5..73b2708 100644 --- a/tests/test_api_v1_statuses_id_favourite.cpp +++ b/tests/test_api_v1_statuses_id_favourite.cpp @@ -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); diff --git a/tests/test_api_v1_statuses_id_unfavourite.cpp b/tests/test_api_v1_statuses_id_unfavourite.cpp index a79daa7..cb9c059 100644 --- a/tests/test_api_v1_statuses_id_unfavourite.cpp +++ b/tests/test_api_v1_statuses_id_unfavourite.cpp @@ -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); diff --git a/tests/test_api_v1_suggestions.cpp b/tests/test_api_v1_suggestions.cpp index 6533c04..445bc83 100644 --- a/tests/test_api_v1_suggestions.cpp +++ b/tests/test_api_v1_suggestions.cpp @@ -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); diff --git a/tests/test_api_v1_suggestions_accountid.cpp b/tests/test_api_v1_suggestions_accountid.cpp index 11a3e34..32d1fc8 100644 --- a/tests/test_api_v1_suggestions_accountid.cpp +++ b/tests/test_api_v1_suggestions_accountid.cpp @@ -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);