Fixup tests

This commit is contained in:
Johannes Zellner 2022-08-19 16:31:54 +02:00
parent a2d2edabaf
commit 46982e68f7

View file

@ -155,8 +155,7 @@ describe('Application life cycle test', function () {
function pushFile() { function pushFile() {
const env = Object.create(process.env); const env = Object.create(process.env);
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh'; env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
const defaultBranch = app.manifest.version === '1.24.0' ? 'main' : 'master'; execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} main`,
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} ${defaultBranch}`,
{ env: env, cwd: repodir }); { env: env, cwd: repodir });
fs.rmSync(repodir, { recursive: true, force: true }); fs.rmSync(repodir, { recursive: true, force: true });
} }