cdk-docker-image-deployment icon indicating copy to clipboard operation
cdk-docker-image-deployment copied to clipboard

Snapshot test always fails even when no changes are made

Open kdnakt opened this issue 1 year ago • 0 comments

Expected behavior

The npm test command successfully completes a snapshot test.

Actual behavior

I have a project with cdk-docker-image-deployment v0.0.577 and am trying to implement a snapshot test like this using a stack like the one below:

export class CdkTest1Stack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const repo = ecr.Repository.fromRepositoryName(this, 'MyRepository', 'myrepository');

    new imagedeploy.DockerImageDeployment(this, 'ExampleImageDeploymentWithTag', {
      source: imagedeploy.Source.directory('./docker'),
      destination: imagedeploy.Destination.ecr(repo, { 
        tag: 'myspecialtag',
      }),
    });
  }
}

However, when I execute npm test right after executing npm test -u, it always fails with the following output.

image

kdnakt avatar May 29 '24 17:05 kdnakt