Skip to content

Conversation

@cristianrgreco
Copy link
Collaborator

@cristianrgreco cristianrgreco commented Apr 5, 2023

BREAKING CHANGES

  1. DefaultPullPolicy and AlwaysPullPolicy replaced by static helper PullPolicy

Previously:

import { GenericContainer, DefaultPullPolicy, AlwaysPullPolicy } from "testcontainers";

const container1 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(new AlwaysPullPolicy())
  .build();

const container2 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(new DefaultPullPolicy())
  .build();

After:

import { GenericContainer, PullPolicy } from "testcontainers";

const container1 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(PullPolicy.alwaysPull())
  .build();

const container2 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(PullPolicy.defaultPolicy())
  .build();

  1. PullPolicy renamed to ImagePullPolicy

Previously:

import { GenericContainer, PullPolicy } from "testcontainers";

class CustomPullPolicy implements PullPolicy {
  public shouldPull(): boolean {
    return true;
  }
}

After:

import { GenericContainer, ImagePullPolicy } from "testcontainers";

class CustomPullPolicy implements ImagePullPolicy {
  public shouldPull(): boolean {
    return true;
  }
}

@netlify
Copy link

netlify bot commented Apr 5, 2023

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit 41a840e
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-node/deploys/6437cc759014ec0008ca909c
😎 Deploy Preview https://deploy-preview-524--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cristianrgreco cristianrgreco added enhancement New feature or request major An incompatible API change labels Apr 5, 2023
@cristianrgreco cristianrgreco self-assigned this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major An incompatible API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants