Skip to content

Commit

Permalink
wip: stream logs
Browse files Browse the repository at this point in the history
  • Loading branch information
whi-tw committed Apr 10, 2024
1 parent 48624d9 commit 4e21123
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/basic-auth-sidecar/basic-auth-sidecar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ describe("BasicAuthSidecar", function () {
.forResponsePredicate((response) => response === "OK"),
])
)
.withLogConsumer((stream) => {
stream.on("data", (line) => console.log(line));

Check failure on line 114 in test/basic-auth-sidecar/basic-auth-sidecar.test.ts

View workflow job for this annotation

GitHub Actions / run-tests

Unexpected console statement
stream.on("err", (line) => console.error(line));

Check failure on line 115 in test/basic-auth-sidecar/basic-auth-sidecar.test.ts

View workflow job for this annotation

GitHub Actions / run-tests

Unexpected console statement
stream.on("end", () => console.log("Stream closed"));

Check failure on line 116 in test/basic-auth-sidecar/basic-auth-sidecar.test.ts

View workflow job for this annotation

GitHub Actions / run-tests

Unexpected console statement
})
.start();

sidecarRequester = chai
Expand Down Expand Up @@ -237,6 +242,7 @@ describe("BasicAuthSidecar", function () {
BASIC_AUTH_PASSWORD: "test",
IP_ALLOW_LIST: JSON.stringify([sourceIp + "/32"]),
});
console.log(`sourceIp: ${sourceIp}`);

Check failure on line 245 in test/basic-auth-sidecar/basic-auth-sidecar.test.ts

View workflow job for this annotation

GitHub Actions / run-tests

Unexpected console statement
await sidecarRequester.get("/get").then((res) => {
expect(res).to.have.status(200);
});
Expand Down

0 comments on commit 4e21123

Please sign in to comment.