mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-19 18:06:46 +00:00
Do not set --iidfile flag if local and tar exporters are used
More tests for context module Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
d90dfadeb5
commit
08566ae0e1
7 changed files with 435 additions and 268 deletions
|
@ -1,10 +1,24 @@
|
|||
import fs from 'fs';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as semver from 'semver';
|
||||
import * as buildx from '../src/buildx';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as context from '../src/context';
|
||||
|
||||
const digest = 'sha256:bfb45ab72e46908183546477a08f8867fc40cebadd00af54b071b097aed127a9';
|
||||
|
||||
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
|
||||
const tmpDir = path.join('/tmp/.docker-build-push-jest').split(path.sep).join(path.posix.sep);
|
||||
if (!fs.existsSync(tmpDir)) {
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
}
|
||||
return tmpDir;
|
||||
});
|
||||
|
||||
jest.spyOn(context, 'tmpNameSync').mockImplementation((): string => {
|
||||
return path.join('/tmp/.docker-build-push-jest', '.tmpname-jest').split(path.sep).join(path.posix.sep);
|
||||
});
|
||||
|
||||
describe('getImageID', () => {
|
||||
it('matches', async () => {
|
||||
const imageIDFile = await buildx.getImageIDFile();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue