Skip to content

Commit

Permalink
task: removing '[kit] Shutting down...' message
Browse files Browse the repository at this point in the history
  • Loading branch information
tatang26 committed Feb 24, 2025
1 parent 98b0786 commit 3a351b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
3 changes: 0 additions & 3 deletions dev/internal/rebuilder/rebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package rebuilder

import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
Expand Down Expand Up @@ -34,7 +33,5 @@ func Serve(ctx context.Context) error {
<-exitCh
}

fmt.Println("[kit] Shutting down...")

return nil
}
16 changes: 4 additions & 12 deletions dev/internal/rebuilder/rebuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,8 @@ func TestServe(t *testing.T) {
var buf bytes.Buffer
io.Copy(&buf, r)

if !strings.Contains(buf.String(), "[kit] Starting app") {
t.Errorf("Expected '[kit] Starting app' to be in the output, got '%v'", buf.String())
}

if !strings.Contains(buf.String(), "[kit] Shutting down...") {
t.Errorf("Expected '[kit] Shutting down...' to be in the output, got '%v'", buf.String())
if !strings.Contains(buf.String(), "web |") {
t.Errorf("Expected 'web |' to be in the output, got '%v'", buf.String())
}
})

Expand Down Expand Up @@ -118,17 +114,13 @@ func TestServe(t *testing.T) {
var buf bytes.Buffer
io.Copy(&buf, r)

if !strings.Contains(buf.String(), "[kit] Starting app") {
t.Errorf("Expected '[kit] Starting app' to be in the output, got '%v'", buf.String())
if !strings.Contains(buf.String(), "web |") {
t.Errorf("Expected 'web |' to be in the output, got '%v'", buf.String())
}

if !strings.Contains(buf.String(), "Restarted...") {
t.Errorf("Expected 'Restarted...' to be in the output, got '%v'", buf.String())
}

if !strings.Contains(buf.String(), "[kit] Shutting down...") {
t.Errorf("Expected '[kit] Shutting down...' to be in the output, got '%v'", buf.String())
}
})

t.Run("Correct - Skip invalid commands in Procfile", func(t *testing.T) {
Expand Down

0 comments on commit 3a351b2

Please sign in to comment.