Skip to content

Commit 02f0fe1

Browse files
committed
fix(tomcat): fix context_path integration test assertion - root serves Tomcat default page not 404
1 parent 12b80a9 commit 02f0fe1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/integration/tomcat_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package integration_test
22

33
import (
4-
"net/http"
54
"path/filepath"
65
"testing"
76

87
"github.com/cloudfoundry/switchblade"
98
"github.com/cloudfoundry/switchblade/matchers"
10-
"github.com/onsi/gomega"
119
"github.com/sclevine/spec"
1210

1311
. "github.com/onsi/gomega"
@@ -445,7 +443,7 @@ func testTomcat(platform switchblade.Platform, fixtures string) func(*testing.T,
445443
})
446444

447445
context("with context_path configured", func() {
448-
it("serves app at configured path and returns 404 at root", func() {
446+
it("serves app at configured path and not at root", func() {
449447
deployment, logs, err := platform.Deploy.
450448
WithEnv(map[string]string{
451449
"BP_JAVA_VERSION": "11",
@@ -455,7 +453,7 @@ func testTomcat(platform switchblade.Platform, fixtures string) func(*testing.T,
455453
Expect(err).NotTo(HaveOccurred(), logs.String())
456454

457455
Eventually(deployment).Should(matchers.Serve(ContainSubstring("OK")).WithEndpoint("/my/app"))
458-
Eventually(deployment).Should(matchers.Serve(gomega.Anything()).WithEndpoint("/").WithExpectedStatusCode(http.StatusNotFound))
456+
Eventually(deployment).ShouldNot(matchers.Serve(ContainSubstring("OK")).WithEndpoint("/"))
459457
})
460458
})
461459
}

0 commit comments

Comments
 (0)