mirror of
https://codeberg.org/demostf/api-test.git
synced 2026-06-03 17:44:07 +02:00
add basic private demo tests
This commit is contained in:
parent
a265dc4f3f
commit
24dddb5e6d
9 changed files with 509 additions and 281 deletions
|
|
@ -15,8 +15,8 @@ in
|
|||
src = fetchFromGitHub {
|
||||
owner = "demostf";
|
||||
repo = "api";
|
||||
rev = "1a8380360b993226ae1c6fcc226011e03a6c1467";
|
||||
hash = "sha256-JcBRU1N44tt0QDLnj6z9MCT3V2s2dkf+JbpWb1rmXnY=";
|
||||
rev = "52b9bc09fd187bf3bbc11dbe4443af0e07a716a4";
|
||||
hash = "sha256-iMU7C2g76w5d5CtxRW5H50FxY+UlOc5gSpjxxbVyqUw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-EYWCR2aJAoyWvEX+SML4Fb3F3KGcUtwCgqhAGT6ZjZ4=";
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
DB_USERNAME = "demostf";
|
||||
APP_ROOT = "http://localhost";
|
||||
EDIT_SECRET = "edit";
|
||||
ACCESS_KEY = "access";
|
||||
PARSER_PATH = "${pkgs.demostf-parser}/bin/parse_demo";
|
||||
};
|
||||
user = "demostf";
|
||||
|
|
@ -108,7 +109,7 @@
|
|||
testBinary = lib.getExe pkgs.demostf-api-test;
|
||||
initSql = pkgs.fetchurl {
|
||||
url = "https://github.com/demostf/db/raw/refs/heads/master/schema.sql";
|
||||
hash = "sha256-AwXN9mh9CRk6HWdvyUR+YdBkpmExNIDOIeDMz6XqjEQ=";
|
||||
hash = "sha256-tdMYDxlvpuQRxHglX46sCldxzsh1cDxkch2lGWnFH8E=";
|
||||
};
|
||||
in ''
|
||||
machine.succeed("mkdir /demos && chmod 0777 /demos");
|
||||
|
|
@ -120,6 +121,7 @@
|
|||
machine.wait_until_succeeds("curl http://127.0.0.1", timeout=45)
|
||||
machine.succeed("DB_URL='postgres://demostf:test@localhost/demostf'\
|
||||
BASE_URL='http://localhost/'\
|
||||
ACCESS_KEY='access'\
|
||||
EDIT_KEY='edit'\
|
||||
${testBinary}", timeout=180)
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue