Unverified Commit b8a8e973 authored by Maximilian Bosch's avatar Maximilian Bosch
Browse files

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.
parent 42105b2b
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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