Allow building buildx from source

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-07-02 07:02:22 +02:00
parent a1c666d855
commit f40e8894f1
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
14 changed files with 342 additions and 44 deletions

View file

@ -1,6 +1,16 @@
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as context from '../src/context';
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
const tmpDir = path.join('/tmp/.docker-setup-buildx-jest').split(path.sep).join(path.posix.sep);
if (!fs.existsSync(tmpDir)) {
fs.mkdirSync(tmpDir, {recursive: true});
}
return tmpDir;
});
describe('getInputList', () => {
it('handles single line correctly', async () => {
await setInput('foo', 'bar');