diff options
author | emilylange <git@emilylange.de> | 2024-04-02 17:04:29 +0200 |
---|---|---|
committer | emilylange <git@emilylange.de> | 2024-04-02 17:04:29 +0200 |
commit | 680bc07727ccc10448e4f16c8b7e61cd41c475b0 (patch) | |
tree | 9cf1367847979c7e32abcf8a383287caeb3b5a31 /nixos/tests/forgejo.nix | |
parent | dab7aa20ed898ed1264edbc7f1ae241427cc3ba6 (diff) |
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 dab7aa20ed898ed1264edbc7f1ae241427cc3ba6.
Diffstat (limited to 'nixos/tests/forgejo.nix')
-rw-r--r-- | nixos/tests/forgejo.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/tests/forgejo.nix b/nixos/tests/forgejo.nix index 6acd6acb50fa9..b14df0a2c74f9 100644 --- a/nixos/tests/forgejo.nix +++ b/nixos/tests/forgejo.nix @@ -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.'" |