Skip to content

Commit

Permalink
Attempt to solve the docker image asset issue in the gh cdk tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mikayla Thompson <[email protected]>
  • Loading branch information
mikaylathompson committed Jun 25, 2024
1 parent 024166b commit 6cb5905
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ snapshot:
metadata_migration:
from_snapshot:
min_replicas: 0
replay:
docker:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {createStackComposer} from "./test-utils";
import {Capture, Match, Template} from "aws-cdk-lib/assertions";
import {MigrationConsoleStack} from "../lib/service-stacks/migration-console-stack";
import {ContainerImage} from "aws-cdk-lib/aws-ecs";
import * as yaml from 'yaml';


test('Test that IAM policy contains fetch migration IAM statements when fetch migration is enabled', () => {
const contextOptions = {
vpcEnabled: true,
Expand Down Expand Up @@ -57,7 +57,12 @@ test('Test that IAM policy does not contain fetch migration IAM statements when
expect(iamPassRoleStatement).toBeFalsy()
})


test('Test that services yaml parameter is created', () => {
// Mock using local Dockerfile (which may not exist and would fail synthesis) with the intent of using a "fake-image" from a public registry
jest.mock("aws-cdk-lib/aws-ecr-assets")
jest.spyOn(ContainerImage, 'fromDockerImageAsset').mockImplementation(() => ContainerImage.fromRegistry("fake-image"));

const contextOptions = {
vpcEnabled: true,
migrationAssistanceEnabled: true,
Expand Down

0 comments on commit 6cb5905

Please sign in to comment.