build-push-action/setup-buildx/__tests__/installer.test.ts
CrazyMax 6df1822dc3
Add setup-buildx action (#71)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-08-11 14:33:49 +02:00

21 lines
653 B
TypeScript

import fs = require('fs');
import * as installer from '../src/installer';
import * as path from 'path';
import * as os from 'os';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ghaction-docker-buildx-'));
describe('installer', () => {
it('acquires v0.2.2 version of buildx', async () => {
const buildx = await installer.buildx('v0.2.2', tmpDir);
console.log(buildx);
expect(fs.existsSync(buildx)).toBe(true);
}, 100000);
it('acquires latest version of buildx', async () => {
const buildx = await installer.buildx('latest', tmpDir);
console.log(buildx);
expect(fs.existsSync(buildx)).toBe(true);
}, 100000);
});