mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-04-22 16:06:36 +02:00
fix current context as builder name for docker driver
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
774ea5c2f1
commit
05ca2e6f5e
5 changed files with 31 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
||||
import * as uuid from 'uuid';
|
||||
import {Docker} from '@docker/actions-toolkit/lib/docker';
|
||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
||||
import {Node} from '@docker/actions-toolkit/lib/types/builder';
|
||||
|
||||
|
@ -8,6 +9,10 @@ import * as context from '../src/context';
|
|||
jest.mock('uuid');
|
||||
jest.spyOn(uuid, 'v4').mockReturnValue('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');
|
||||
|
||||
jest.spyOn(Docker, 'context').mockImplementation((): Promise<string> => {
|
||||
return Promise.resolve('default');
|
||||
});
|
||||
|
||||
describe('getCreateArgs', () => {
|
||||
beforeEach(() => {
|
||||
process.env = Object.keys(process.env).reduce((object, key) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue