Skip to content

Commit

Permalink
Fix broken e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhopaul123 committed Jun 8, 2020
1 parent 0480cbb commit c56e9b2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion e2e/addons/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ var _ = Describe("addons flow", func() {

for _, logLine := range svcLogs {
Expect(logLine.Message).NotTo(Equal(""))
Expect(logLine.TaskID).NotTo(Equal(""))
Expect(logLine.LogStreamName).NotTo(Equal(""))
Expect(logLine.Timestamp).NotTo(Equal(0))
Expect(logLine.IngestionTime).NotTo(Equal(0))
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/init/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var _ = Describe("init flow", func() {

for _, logLine := range svcLogs {
Expect(logLine.Message).NotTo(Equal(""))
Expect(logLine.TaskID).NotTo(Equal(""))
Expect(logLine.LogStreamName).NotTo(Equal(""))
Expect(logLine.Timestamp).NotTo(Equal(0))
Expect(logLine.IngestionTime).NotTo(Equal(0))
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/internal/client/outputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func toSvcListOutput(jsonInput string) (*SvcListOutput, error) {
}

type SvcLogsOutput struct {
TaskID string `json:"taskID"`
LogStreamName string `json:"logStreamName"`
IngestionTime int64 `json:"ingestionTime"`
Timestamp int64 `json:"timestamp"`
Message string `json:"message"`
Expand Down
2 changes: 1 addition & 1 deletion e2e/multi-env-app/multi_env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ var _ = Describe("Multiple Env App", func() {

for _, logLine := range svcLogs {
Expect(logLine.Message).NotTo(Equal(""))
Expect(logLine.TaskID).NotTo(Equal(""))
Expect(logLine.LogStreamName).NotTo(Equal(""))
Expect(logLine.Timestamp).NotTo(Equal(0))
Expect(logLine.IngestionTime).NotTo(Equal(0))
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/multi-svc-app/multi_svc_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var _ = Describe("Multiple Service App", func() {
Expect("./copilot").Should(BeADirectory())
})

It("app ls includes new project", func() {
It("app ls includes new application", func() {
apps, err := cli.AppList()
Expect(err).NotTo(HaveOccurred())
Expect(apps).To(ContainSubstring(appName))
Expand Down Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Multiple Service App", func() {

for _, logLine := range svcLogs {
Expect(logLine.Message).NotTo(Equal(""))
Expect(logLine.TaskID).NotTo(Equal(""))
Expect(logLine.LogStreamName).NotTo(Equal(""))
Expect(logLine.Timestamp).NotTo(Equal(0))
Expect(logLine.IngestionTime).NotTo(Equal(0))
}
Expand Down
7 changes: 7 additions & 0 deletions e2e/multi-svc-app/www/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ func SimpleGet(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
w.Write([]byte("www"))
}

func healthCheckHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
log.Println("Health Check Succeeded")
w.WriteHeader(http.StatusOK)
w.Write([]byte("www"))
}

func main() {
router := httprouter.New()
router.GET("/", healthCheckHandler)
router.GET("/www/", SimpleGet)
log.Fatal(http.ListenAndServe(":80", router))
}

0 comments on commit c56e9b2

Please sign in to comment.