docker: install with custom runDir

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-28 20:15:33 +01:00
parent 93fa96f54f
commit 3b532d1b91
4 changed files with 37 additions and 38 deletions

View File

@@ -14,11 +14,15 @@
* limitations under the License.
*/
import path from 'path';
import {describe, expect, test} from '@jest/globals';
import {Install} from '../../src/docker/install';
import {Docker} from '../../src/docker/docker';
// prettier-ignore
const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-jest');
describe('install', () => {
// prettier-ignore
test.each(['23.0.0'])(
@@ -26,7 +30,7 @@ describe('install', () => {
await expect((async () => {
const install = new Install();
const toolPath = await install.download(version);
await install.install(toolPath, version);
await install.install(toolPath, tmpDir, version);
await Docker.printVersion();
await Docker.printInfo();
})()).resolves.not.toThrow();