Merging upstream version 0.6.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
56fc4a167c
commit
cf4e7a073c
11 changed files with 5674 additions and 470 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"git": {
|
||||
"sha1": "c49e0c3fc6ec4b8821e2c28dad38e1ac04571b0b"
|
||||
"sha1": "041a56ecea92e78400f8dea7dad2b7f9c175c22a"
|
||||
},
|
||||
"path_in_vcs": ""
|
||||
}
|
|
@ -4,12 +4,12 @@ steps:
|
|||
test:
|
||||
image: rust
|
||||
environment:
|
||||
- "FORGEJO_API_CI_INSTANCE_URL=http://forgejo-testing:3000/"
|
||||
- FORGEJO_API_CI_TOKEN=6eaba97c49d9f1bbe54f8975ea884af54826c9fe
|
||||
FORGEJO_API_CI_INSTANCE_URL: http://forgejo-testing:3000/
|
||||
FORGEJO_API_CI_TOKEN: 6d727f8db0df8a2852c9dfd38dca6b830741c079
|
||||
commands:
|
||||
- cargo test
|
||||
|
||||
services:
|
||||
forgejo-testing:
|
||||
pull: true
|
||||
image: code.cartoon-aa.xyz/cyborus/ci-forgejo:9.0.0
|
||||
image: code.cartoon-aa.xyz/cyborus/ci-forgejo:10.0.0
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[package]
|
||||
edition = "2021"
|
||||
name = "forgejo-api"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
build = false
|
||||
autolib = false
|
||||
autobins = false
|
||||
|
@ -51,7 +51,7 @@ version = "1.6.0"
|
|||
version = "1.5.0"
|
||||
|
||||
[dependencies.reqwest]
|
||||
version = "0.11.18"
|
||||
version = "0.12"
|
||||
features = [
|
||||
"json",
|
||||
"multipart",
|
||||
|
@ -93,7 +93,7 @@ version = "1.7.0"
|
|||
version = "0.6.9"
|
||||
|
||||
[dev-dependencies.reqwest]
|
||||
version = "0.11.18"
|
||||
version = "0.12"
|
||||
features = ["cookies"]
|
||||
|
||||
[dev-dependencies.tokio]
|
||||
|
|
6
Cargo.toml.orig
generated
6
Cargo.toml.orig
generated
|
@ -1,7 +1,7 @@
|
|||
workspace = { members = ["generator"] }
|
||||
[package]
|
||||
name = "forgejo-api"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0 OR MIT"
|
||||
repository = "https://codeberg.org/Cyborus/forgejo-api"
|
||||
|
@ -10,7 +10,7 @@ description = "Interface to Forgejo's Web API"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.11.18", features = ["json", "multipart"] }
|
||||
reqwest = { version = "0.12", features = ["json", "multipart"] }
|
||||
soft_assert = "0.1.1"
|
||||
thiserror = "1.0.43"
|
||||
tokio = { version = "1.29.1", features = ["net"] }
|
||||
|
@ -24,5 +24,5 @@ zeroize = "1.7.0"
|
|||
|
||||
[dev-dependencies]
|
||||
eyre = "0.6.9"
|
||||
reqwest = { version = "0.11.18", features = ["cookies"] }
|
||||
reqwest = { version = "0.12", features = ["cookies"] }
|
||||
tokio = { version = "1.29.1", features = ["net", "fs", "rt", "macros"] }
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2103
swagger.v1.json
2103
swagger.v1.json
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,7 @@ async fn user() {
|
|||
.expect("failed to create user");
|
||||
|
||||
let query = AdminSearchUsersQuery::default();
|
||||
let users = api
|
||||
let (_, users) = api
|
||||
.admin_search_users(query)
|
||||
.await
|
||||
.expect("failed to search users");
|
||||
|
@ -34,7 +34,7 @@ async fn user() {
|
|||
"could not find new user"
|
||||
);
|
||||
let query = AdminGetAllEmailsQuery::default();
|
||||
let users = api
|
||||
let (_, users) = api
|
||||
.admin_get_all_emails(query)
|
||||
.await
|
||||
.expect("failed to search emails");
|
||||
|
@ -84,7 +84,7 @@ async fn org() {
|
|||
.expect("failed to create org");
|
||||
let query = AdminGetAllOrgsQuery::default();
|
||||
assert!(
|
||||
!api.admin_get_all_orgs(query).await.unwrap().is_empty(),
|
||||
!api.admin_get_all_orgs(query).await.unwrap().1.is_empty(),
|
||||
"org list empty"
|
||||
);
|
||||
let rename_opt = RenameUserOption {
|
||||
|
@ -145,7 +145,7 @@ async fn cron() {
|
|||
let api = common::login();
|
||||
|
||||
let query = AdminCronListQuery::default();
|
||||
let crons = api
|
||||
let (_, crons) = api
|
||||
.admin_cron_list(query)
|
||||
.await
|
||||
.expect("failed to get crons list");
|
||||
|
@ -236,7 +236,7 @@ async fn quota_group() {
|
|||
.as_ref()
|
||||
.is_some_and(|rules| rules.len() == 1));
|
||||
|
||||
let quota_groups = api
|
||||
let (_, quota_groups) = api
|
||||
.admin_list_quota_groups()
|
||||
.await
|
||||
.expect("failed to list quota groups");
|
||||
|
|
|
@ -18,7 +18,7 @@ async fn org_vars() {
|
|||
api.org_create(org_opt).await.expect("failed to create org");
|
||||
|
||||
let query = GetOrgVariablesListQuery::default();
|
||||
let var_list = api
|
||||
let (_, var_list) = api
|
||||
.get_org_variables_list("org-vars", query)
|
||||
.await
|
||||
.expect("failed to list org vars");
|
||||
|
|
|
@ -212,6 +212,7 @@ async fn release() {
|
|||
api.repo_list_releases("TestingAdmin", "release-test", query)
|
||||
.await
|
||||
.unwrap()
|
||||
.1
|
||||
.is_empty(),
|
||||
"there should be no releases yet"
|
||||
);
|
||||
|
@ -400,7 +401,7 @@ async fn tag_protection() {
|
|||
let git = Git::new("./test_repos/tag-protect");
|
||||
let _ = basic_repo(&api, &git, "tag-protect").await;
|
||||
|
||||
let tag_protections = api
|
||||
let (_, tag_protections) = api
|
||||
.repo_list_tag_protection("TestingAdmin", "tag-protect")
|
||||
.await
|
||||
.expect("failed to list tag protections");
|
||||
|
@ -455,7 +456,7 @@ async fn repo_vars() {
|
|||
let _ = basic_repo(&api, &git, "repo-vars").await;
|
||||
|
||||
let query = GetRepoVariablesListQuery::default();
|
||||
let var_list = api
|
||||
let (_, var_list) = api
|
||||
.get_repo_variables_list("TestingAdmin", "repo-vars", query)
|
||||
.await
|
||||
.expect("failed to list repo vars");
|
||||
|
|
|
@ -26,14 +26,14 @@ async fn follow() {
|
|||
let api = common::login();
|
||||
|
||||
let query = UserListFollowingQuery::default();
|
||||
let following = api
|
||||
let (_, following) = api
|
||||
.user_list_following("TestingAdmin", query)
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(following.is_empty(), "following list not empty");
|
||||
|
||||
let query = UserListFollowersQuery::default();
|
||||
let followers = api
|
||||
let (_, followers) = api
|
||||
.user_list_followers("TestingAdmin", query)
|
||||
.await
|
||||
.unwrap();
|
||||
|
@ -62,14 +62,14 @@ async fn follow() {
|
|||
api.user_current_put_follow("Follower").await.unwrap();
|
||||
|
||||
let query = UserListFollowingQuery::default();
|
||||
let following = api
|
||||
let (_, following) = api
|
||||
.user_list_following("TestingAdmin", query)
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(!following.is_empty(), "following list empty");
|
||||
|
||||
let query = UserListFollowersQuery::default();
|
||||
let followers = api
|
||||
let (_, followers) = api
|
||||
.user_list_followers("TestingAdmin", query)
|
||||
.await
|
||||
.unwrap();
|
||||
|
@ -197,7 +197,7 @@ async fn user_vars() {
|
|||
let api = common::login();
|
||||
|
||||
let query = GetUserVariablesListQuery::default();
|
||||
let var_list = api
|
||||
let (_, var_list) = api
|
||||
.get_user_variables_list(query)
|
||||
.await
|
||||
.expect("failed to list user vars");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue