diff --git a/tests/suites/config.js b/tests/suites/config.js index 61af6548ea..977a293486 100644 --- a/tests/suites/config.js +++ b/tests/suites/config.js @@ -15,10 +15,10 @@ module.exports = [ } }, image: `${__dirname}/balena-image.docker`, - // This is the name of a folder or file containing extra artifacts needed for secure-boot provisioning - // E.g for the cm4-io-board the `secure-boot-msd` folder is required + // This is the name of a folder or file containing extra artifacts needed for the test suite + // E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required // This artifact/artifact must be copied into the `suites` folder before running the test - sbArtifacts: process.env.SB_ARTIFACTS, + artifacts: process.env.ARTIFACTS, debug: { // Exit the ongoing test suite if a test fails failFast: true, @@ -59,10 +59,10 @@ module.exports = [ // Mark unstable tests to be skipped unstable: [''] }, - // This is the name of a folder or file containing extra artifacts needed for secure-boot provisioning - // E.g for the cm4-io-board the `secure-boot-msd` folder is required + // This is the name of a folder or file containing extra artifacts needed for the test suite + // E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required // This artifact/artifact must be copied into the `suites` folder before running the test - sbArtifacts: process.env.SB_ARTIFACTS, + artifacts: process.env.ARTIFACTS, workers: process.env.WORKER_TYPE === 'qemu' ? ['http://worker'] : { balenaApplication: process.env.BALENACLOUD_APP_NAME.split(','), apiKey: process.env.BALENACLOUD_API_KEY, @@ -83,10 +83,10 @@ module.exports = [ } }, image: `${__dirname}/balena.img.gz`, - // This is the name of a folder or file containing extra artifacts needed for secure-boot provisioning - // E.g for the cm4-io-board the `secure-boot-msd` folder is required + // This is the name of a folder or file containing extra artifacts needed for the test suite + // E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required // This artifact/artifact must be copied into the `suites` folder before running the test - sbArtifacts: process.env.SB_ARTIFACTS, + artifacts: process.env.ARTIFACTS, debug: { // Exit the ongoing test suite if a test fails failFast: true, diff --git a/tests/suites/os/suite.js b/tests/suites/os/suite.js index 825bb68096..4e17bbb627 100644 --- a/tests/suites/os/suite.js +++ b/tests/suites/os/suite.js @@ -377,6 +377,15 @@ module.exports = { console.log("No migration requested") } + + if(this.suite.options.artifacts !== undefined){ + // extra artifacts "artifacts" are defined in the config.js of the suite + // these artifacts must be in the "suites" directory in the config.js - so you must copy them into suites before + // running the tests if these are build time artifacts + console.log(`Sending extra artifact folder: ${this.suite.options.artifacts} to worker...`) + await this.worker.sendFile(`${__dirname}/${this.suite.options.artifacts}`,'/data/', 'worker'); + } + if ( this.os.configJson.installer.secureboot ) { console.log("Opting-in secure boot and full disk encryption") } else {