Skip to content

Commit

Permalink
fix: Pass k6 api token correctly (no-changelog) (#10536)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi authored Aug 23, 2024
1 parent 7194b1c commit 6422fb3
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions packages/@n8n/benchmark/scripts/runInCloud.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,22 @@ async function runBenchmarksOnVm(config, benchmarkEnv) {

console.log('Running benchmarks...');
const runScriptPath = path.join(scriptsDir, 'runOnVm.mjs');
await sshClient.ssh(
`npx zx ${runScriptPath} --n8nDockerTag=${config.n8nTag} --benchmarkDockerTag=${config.benchmarkTag} ${config.n8nSetupToUse}`,
{
// Test run should always log its output
verbose: true,
},
);

const flags = {
n8nDockerTag: config.n8nTag,
benchmarkDockerTag: config.benchmarkTag,
k6ApiToken: config.k6ApiToken,
};

const flagsString = Object.entries(flags)
.filter(([, value]) => value !== undefined)
.map(([key, value]) => `--${key}=${value}`)
.join(' ');

await sshClient.ssh(`npx zx ${runScriptPath} ${flagsString} ${config.n8nSetupToUse}`, {
// Test run should always log its output
verbose: true,
});
}

async function ensureVmIsReachable(sshClient) {
Expand Down

0 comments on commit 6422fb3

Please sign in to comment.