summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-05-27 18:30:04 +0200
committerCyborus <cyborus@cyborus.xyz>2024-05-27 18:38:54 +0200
commit1c3bd75c824d9abc4141f684b4f9821552f4049d (patch)
tree6845d8519964da7736648ff61164fe440b1ae498
parentsplit tests into smaller tests (diff)
downloadforgejo-api-1c3bd75c824d9abc4141f684b4f9821552f4049d.tar.xz
forgejo-api-1c3bd75c824d9abc4141f684b4f9821552f4049d.zip
add delays to allow forgejo's state to settle
-rw-r--r--tests/repo.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/repo.rs b/tests/repo.rs
index a4e3bf5..004cb8e 100644
--- a/tests/repo.rs
+++ b/tests/repo.rs
@@ -97,6 +97,9 @@ async fn pull_request() {
milestone: None,
title: Some("test pr".into()),
};
+
+ // Wait for... something to happen, or else creating a PR will return 404
+ tokio::time::sleep(std::time::Duration::from_secs(3)).await;
let pr = api
.repo_create_pull_request("TestingAdmin", "pr-test", pr_opt)
.await
@@ -147,6 +150,10 @@ async fn release() {
let git = Git::new("./test_repos/release");
let _ = basic_repo(&api, &git, "release-test").await;
+ // Wait for the repo to be finished being populated, or else creating a
+ // release will return "422 repo is empty"
+ tokio::time::sleep(std::time::Duration::from_secs(3)).await;
+
let query = RepoListReleasesQuery::default();
assert!(
api.repo_list_releases("TestingAdmin", "release-test", query)