nixos/tests/gitea: fix

* Since Gitea 1.20 the request to `/commits` requires at least one retry
  because it appears to take a moment until Gitea actually knows that
  this repo isn't empty anymore (previously on 1.20 this failed with
  HTTP 409 which occurs when the requested repo is empty).
* Remove `*.shutdown()`, for some reason they hang regularly for unknown
  reasons.
This commit is contained in:
Maximilian Bosch 2023-07-17 11:59:35 +02:00
parent 42105b2ba3
commit b8a8e973b0
No known key found for this signature in database
GPG Key ID: 9A6EEA275CA5BE0A

View File

@ -121,14 +121,10 @@ let
client2.succeed(f"GIT_SSH_COMMAND='{GIT_SSH_COMMAND}' git clone {REPO}")
client2.succeed('test "$(cat repo/testfile | xargs echo -n)" = "hello world"')
server.succeed(
server.wait_until_succeeds(
'test "$(curl http://localhost:3000/api/v1/repos/test/repo/commits '
+ '-H "Accept: application/json" | jq length)" = "1"'
)
client1.shutdown()
client2.shutdown()
server.shutdown()
'';
});
in