chore: update dev dependencies
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -59,7 +59,7 @@ describe('resolve', () => {
|
||||
`,
|
||||
null
|
||||
]
|
||||
])('given %p config', async (val, file, exValue, error: Error) => {
|
||||
])('given %p config', async (val: string, file: boolean, exValue: string, error: Error | null) => {
|
||||
try {
|
||||
const buildkit = new BuildKit();
|
||||
let config: string;
|
||||
|
||||
@@ -59,7 +59,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -69,7 +69,7 @@ describe('hasLocalExporter', () => {
|
||||
"target": "build"
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -81,7 +81,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
],
|
||||
[
|
||||
@@ -93,7 +93,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -105,7 +105,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -117,7 +117,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
],
|
||||
[
|
||||
@@ -129,7 +129,7 @@ describe('hasLocalExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
]
|
||||
])('given %o returns %p', async (def: BakeDefinition, expected: boolean) => {
|
||||
@@ -149,7 +149,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -161,7 +161,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -173,7 +173,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -185,7 +185,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
],
|
||||
[
|
||||
@@ -198,7 +198,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
],
|
||||
[
|
||||
@@ -210,7 +210,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true
|
||||
],
|
||||
[
|
||||
@@ -222,7 +222,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
[
|
||||
@@ -234,7 +234,7 @@ describe('hasTarExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false
|
||||
],
|
||||
])('given %o returns %p', async (def: BakeDefinition, expected: boolean) => {
|
||||
@@ -254,7 +254,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -267,7 +267,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
undefined
|
||||
],
|
||||
@@ -281,7 +281,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
undefined
|
||||
],
|
||||
@@ -294,7 +294,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -307,7 +307,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -320,7 +320,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -334,7 +334,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
undefined
|
||||
],
|
||||
@@ -347,7 +347,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -360,7 +360,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -373,7 +373,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
false,
|
||||
undefined
|
||||
],
|
||||
@@ -386,7 +386,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
false
|
||||
],
|
||||
@@ -399,7 +399,7 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
true
|
||||
],
|
||||
@@ -412,11 +412,11 @@ describe('hasDockerExporter', () => {
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
} as unknown as BakeDefinition,
|
||||
true,
|
||||
true
|
||||
],
|
||||
])('given %o and load:%p returns %p', async (def: BakeDefinition, expected: boolean, load: boolean) => {
|
||||
])('given %o and load:%p returns %p', async (def: BakeDefinition, expected: boolean, load: boolean | undefined) => {
|
||||
expect(Bake.hasDockerExporter(def, load)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -162,7 +162,7 @@ describe('resolveBuildSecret', () => {
|
||||
['=bbbbbbb', false, '', '', new Error('=bbbbbbb is not a valid secret')],
|
||||
[`foo=${path.join(fixturesDir, 'secret.txt')}`, true, 'foo', 'bar', null],
|
||||
[`notfound=secret`, true, '', '', new Error('secret file secret not found')]
|
||||
])('given %p key and %p secret', async (kvp: string, file: boolean, exKey: string, exValue: string, error: Error) => {
|
||||
])('given %p key and %p secret', async (kvp: string, file: boolean, exKey: string, exValue: string, error: Error | null) => {
|
||||
try {
|
||||
let secret: string;
|
||||
if (file) {
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('download', () => {
|
||||
['linux', 's390x'],
|
||||
])(
|
||||
'acquires buildx for %s/%s', async (os, arch) => {
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => os);
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => os as NodeJS.Platform);
|
||||
jest.spyOn(osm, 'arch').mockImplementation(() => arch);
|
||||
const install = new Install();
|
||||
const buildxBin = await install.download('latest');
|
||||
@@ -129,6 +129,6 @@ describe('getRelease', () => {
|
||||
});
|
||||
|
||||
it('unknown release', async () => {
|
||||
await expect(Install.getRelease('foo')).rejects.toThrowError(new Error('Cannot find Buildx release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json'));
|
||||
await expect(Install.getRelease('foo')).rejects.toThrow(new Error('Cannot find Buildx release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ import {Docker} from '../../src/docker/docker';
|
||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-install-jest');
|
||||
|
||||
describe('install', () => {
|
||||
jest.retryTimes(2);
|
||||
jest.retryTimes(2, {logErrorsBeforeRetry: true});
|
||||
// prettier-ignore
|
||||
test.each(['v23.0.0'])(
|
||||
'install docker %s', async (version) => {
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('download', () => {
|
||||
['v20.10.22', 'win32'],
|
||||
])(
|
||||
'acquires %p of docker (%s)', async (version, platformOS) => {
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS);
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS as NodeJS.Platform);
|
||||
const install = new Install({
|
||||
version: version,
|
||||
runDir: tmpDir,
|
||||
@@ -68,6 +68,6 @@ describe('getRelease', () => {
|
||||
});
|
||||
|
||||
it('unknown release', async () => {
|
||||
await expect(Install.getRelease('foo')).rejects.toThrowError(new Error('Cannot find Docker release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/docker-releases.json'));
|
||||
await expect(Install.getRelease('foo')).rejects.toThrow(new Error('Cannot find Docker release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/docker-releases.json'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@ describe('actionsRuntimeToken', () => {
|
||||
process.env.ACTIONS_RUNTIME_TOKEN = 'foo';
|
||||
expect(() => {
|
||||
GitHub.actionsRuntimeToken;
|
||||
}).toThrowError();
|
||||
}).toThrow();
|
||||
});
|
||||
it('fixture', async () => {
|
||||
process.env.ACTIONS_RUNTIME_TOKEN = fs.readFileSync(path.join(__dirname, 'fixtures', 'runtimeToken.txt')).toString().trim();
|
||||
@@ -131,11 +131,11 @@ describe('printActionsRuntimeTokenACs', () => {
|
||||
});
|
||||
it('empty', async () => {
|
||||
process.env.ACTIONS_RUNTIME_TOKEN = '';
|
||||
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrowError(new Error('ACTIONS_RUNTIME_TOKEN not set'));
|
||||
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrow(new Error('ACTIONS_RUNTIME_TOKEN not set'));
|
||||
});
|
||||
it('malformed', async () => {
|
||||
process.env.ACTIONS_RUNTIME_TOKEN = 'foo';
|
||||
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrowError(new Error("Cannot parse GitHub Actions Runtime Token: Invalid token specified: Cannot read properties of undefined (reading 'replace')"));
|
||||
await expect(GitHub.printActionsRuntimeTokenACs()).rejects.toThrow(new Error("Cannot parse GitHub Actions Runtime Token: Invalid token specified: Cannot read properties of undefined (reading 'replace')"));
|
||||
});
|
||||
it('refs/heads/master', async () => {
|
||||
const infoSpy = jest.spyOn(core, 'info');
|
||||
|
||||
Reference in New Issue
Block a user