fix(core): update

This commit is contained in:
2023-08-24 17:25:55 +02:00
parent f96de8cdc3
commit 0d42e5f6eb
8 changed files with 1233 additions and 396 deletions

View File

@ -37,6 +37,8 @@ let sortableArray: npmci.Dockerfile[];
tap.test('should return valid Dockerfiles', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
await npmciInstance.start();
dockerfile1 = new npmci.Dockerfile(npmciInstance.dockerManager, {
filePath: './Dockerfile',
read: true,
@ -51,6 +53,7 @@ tap.test('should return valid Dockerfiles', async () => {
tap.test('should read a directory of Dockerfiles', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
return npmci.Dockerfile.readDockerfiles(npmciInstance.dockerManager).then(
async (readDockerfilesArrayArg: npmci.Dockerfile[]) => {
sortableArray = readDockerfilesArrayArg;
@ -69,6 +72,7 @@ tap.test('should sort an array of Dockerfiles', async () => {
tap.test('should build all Dockerfiles', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
return npmciInstance.dockerManager.handleCli({
_: ['docker', 'build'],
});
@ -76,6 +80,7 @@ tap.test('should build all Dockerfiles', async () => {
tap.test('should test all Dockerfiles', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
return npmciInstance.dockerManager.handleCli({
_: ['docker', 'test'],
});
@ -83,6 +88,7 @@ tap.test('should test all Dockerfiles', async () => {
tap.test('should test dockerfiles', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
return npmciInstance.dockerManager.handleCli({
_: ['docker', 'test'],
});
@ -90,6 +96,7 @@ tap.test('should test dockerfiles', async () => {
tap.test('should login docker daemon', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
return npmciInstance.dockerManager.handleCli({
_: ['docker', 'login'],
});
@ -110,6 +117,7 @@ tap.test('should prepare SSH keys', async () => {
// ====
tap.test('should install a certain version of node', async () => {
const npmciInstance = new npmci.Npmci();
await npmciInstance.start();
await npmciInstance.nodejsManager.handleCli({
_: ['node', 'install', 'stable'],
});