Skip to content

Commit

Permalink
ci: update to use agents
Browse files Browse the repository at this point in the history
  • Loading branch information
gperdomor committed Jun 4, 2024
1 parent 6e9d5d7 commit 73a7e3a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/nx-container/src/executors/build/executor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { RepoMetadata } from '@nx-tools/ci-context';
import { workspaceRoot } from '@nx/devkit';
import mockedEnv, { RestoreFn } from 'mocked-env';
import * as path from 'node:path';
import * as buildx from './engines/docker/buildx';
import { run } from './executor';
import { DockerBuildSchema } from './schema';

Expand All @@ -10,6 +11,7 @@ const options: DockerBuildSchema = {
file: 'plugins/nx-container/tests/Dockerfile',
load: true,
tags: ['registry/node:latest'],
quiet: true,
metadata: {
images: ['app/name'],
tags: ['type=sha'],
Expand Down Expand Up @@ -63,7 +65,11 @@ describe('Build Executor', () => {
});

it('can run', async () => {
jest.spyOn(buildx, 'isAvailable').mockResolvedValue(true);
jest.spyOn(buildx, 'getVersion').mockResolvedValue('0.14.0');

const output = await run(options);

expect(output.success).toBe(true);
});
});

0 comments on commit 73a7e3a

Please sign in to comment.