forked from lix-project/hydra
Fix Hydra VM tests
This commit is contained in:
parent
1a899890ac
commit
a71e6301d2
|
@ -252,6 +252,7 @@ in
|
||||||
requires = optional haveLocalDB "postgresql.service";
|
requires = optional haveLocalDB "postgresql.service";
|
||||||
after = optional haveLocalDB "postgresql.service";
|
after = optional haveLocalDB "postgresql.service";
|
||||||
environment = env;
|
environment = env;
|
||||||
|
path = [ pkgs.utillinux ];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -p ${baseDir}
|
mkdir -p ${baseDir}
|
||||||
chown hydra.hydra ${baseDir}
|
chown hydra.hydra ${baseDir}
|
||||||
|
@ -268,8 +269,8 @@ in
|
||||||
|
|
||||||
${optionalString haveLocalDB ''
|
${optionalString haveLocalDB ''
|
||||||
if ! [ -e ${baseDir}/.db-created ]; then
|
if ! [ -e ${baseDir}/.db-created ]; then
|
||||||
${config.services.postgresql.package}/bin/createuser hydra
|
runuser -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/createuser hydra
|
||||||
${config.services.postgresql.package}/bin/createdb -O hydra hydra
|
runuser -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/createdb -O hydra hydra
|
||||||
touch ${baseDir}/.db-created
|
touch ${baseDir}/.db-created
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
Loading…
Reference in a new issue