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

Implement HttpWaitStrategy #418

Merged
merged 6 commits into from
Dec 14, 2022
Merged

Implement HttpWaitStrategy #418

merged 6 commits into from
Dec 14, 2022

Conversation

cristianrgreco
Copy link
Collaborator

@cristianrgreco cristianrgreco commented Dec 13, 2022

Partly addresses #341.

  • Implement HttpWaitStrategy
  • Complete TODOs
  • Update README

@cristianrgreco cristianrgreco added enhancement New feature or request minor Backward compatible functionality labels Dec 13, 2022
private getAgent(): Agent | undefined {
if (this._allowInsecure) {
return new https.Agent({
rejectUnauthorized: false,

Check failure

Code scanning / CodeQL

Disabling certificate validation

Disabling certificate validation is strongly discouraged.

export const checkContainerIsHealthy = async (container: StartedTestContainer): Promise<void> => {
const url = `http://${container.getHost()}:${container.getMappedPort(8080)}`;
const response = await fetch(`${url}/hello-world`);
expect(response.status).toBe(200);
};

export const checkContainerIsHealthyTls = async (container: StartedTestContainer): Promise<void> => {
const url = `https://${container.getHost()}:${container.getMappedPort(8443)}`;
const agent = new https.Agent({ rejectUnauthorized: false });

Check failure

Code scanning / CodeQL

Disabling certificate validation

Disabling certificate validation is strongly discouraged.
@cristianrgreco cristianrgreco marked this pull request as ready for review December 14, 2022 09:35
@cristianrgreco cristianrgreco merged commit 86ef45d into master Dec 14, 2022
@cristianrgreco cristianrgreco deleted the 341-httpwaitstrategy branch December 14, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Backward compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant