buildx: printInspect

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-01-30 00:19:03 +01:00
parent c857b8425c
commit 4259682b27
3 changed files with 25 additions and 1 deletions

View File

@@ -151,6 +151,22 @@ describe('isAvailable', () => {
});
});
describe('printInspect', () => {
it('prints builder2 instance', () => {
const execSpy = jest.spyOn(exec, 'exec');
const buildx = new Buildx({
context: new Context(),
standalone: true
});
buildx.printInspect('builder2').catch(() => {
// noop
});
expect(execSpy).toHaveBeenCalledWith(`buildx`, ['inspect', 'builder2'], {
failOnStdErr: false
});
});
});
describe('printVersion', () => {
it('docker cli', () => {
const execSpy = jest.spyOn(exec, 'exec');