mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixosTests.forgejo: test /api/forgejo/v1/version
We forgot to set two version related ldflags in our packaging and this
should prevent this from going unnoticed again.
Further details are in dab7aa20ed
.
This commit is contained in:
parent
dab7aa20ed
commit
680bc07727
@ -108,6 +108,12 @@ let
|
||||
|
||||
assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg")
|
||||
|
||||
api_version = json.loads(server.succeed("curl http://localhost:3000/api/forgejo/v1/version")).get("version")
|
||||
assert "development" != api_version and "-gitea-" in api_version, (
|
||||
"/api/forgejo/v1/version should not return 'development' "
|
||||
+ f"but should contain a gitea compatibility version string. Got '{api_version}' instead."
|
||||
)
|
||||
|
||||
server.succeed(
|
||||
"curl --fail http://localhost:3000/user/sign_up | grep 'Registration is disabled. "
|
||||
+ "Please contact your site administrator.'"
|
||||
|
Loading…
Reference in New Issue
Block a user