Skip to content

Commit

Permalink
Make logging integration test less fragile
Browse files Browse the repository at this point in the history
  • Loading branch information
c0d1ngm0nk3y authored and mhdawson committed Jun 20, 2024
1 parent b704495 commit edc677a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration/caching_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func testCaching(t *testing.T, context spec.G, it spec.S) {
extenderBuildStr+" Executing launch environment install process",
fmt.Sprintf(extenderBuildStr+" Running 'npm ci --unsafe-perm --cache /layers/%s/npm-cache'", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
))
Expect(logs).To(ContainLines(MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+\.\d+|\d{3})`)))
Expect(logs).To(ContainLines(MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+)(\.\d+)?(ms|s)`)))
Expect(logs).To(ContainLines(
extenderBuildStr+" Configuring launch environment",
extenderBuildStr+" NODE_PROJECT_PATH -> \"/workspace\"",
Expand Down
4 changes: 2 additions & 2 deletions integration/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
fmt.Sprintf(extenderBuildStr+" Running 'npm install --unsafe-perm --cache /layers/%s/npm-cache'", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
))
Expect(logs).To(ContainLines(
MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+\.\d+|\d{3})`),
MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+)(\.\d+)?(ms|s)`),
))
Expect(logs).To(ContainLines(
extenderBuildStr+" Configuring launch environment",
Expand Down Expand Up @@ -135,7 +135,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
fmt.Sprintf(extenderBuildStr+" Running 'npm install --unsafe-perm --cache /layers/%s/npm-cache'", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
))
Expect(logs).To(ContainLines(
MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+\.\d+|\d{3})`),
MatchRegexp(extenderBuildStrEscaped + ` Completed in (\d+)(\.\d+)?(ms|s)`),
))
Expect(logs).To(ContainLines(
extenderBuildStr+" Configuring build environment",
Expand Down

0 comments on commit edc677a

Please sign in to comment.