Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot test always fails even when no changes are made #635

Open
kdnakt opened this issue May 29, 2024 · 0 comments
Open

Snapshot test always fails even when no changes are made #635

kdnakt opened this issue May 29, 2024 · 0 comments

Comments

@kdnakt
Copy link
Contributor

kdnakt commented May 29, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant