Skip to content

Commit

Permalink
devpod
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Farcic committed Dec 1, 2019
1 parent 337923f commit 2524f1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ lint: vendor | $(PKGS) $(GOLINT) # ❷
test -z "$$($(GOLINT) $$pkg | tee /dev/stderr)" || ret=1 ; \
done ; exit $$ret

unittest:
CGO_ENABLED=$(CGO_ENABLED) $(GO) \
test --run UnitTest -v

2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func HelloServer(w http.ResponseWriter, req *http.Request) {
delayNum, _ := strconv.Atoi(delay)
sleep(time.Duration(delayNum) * time.Millisecond)
}
io.WriteString(w, "hello, world!\n")
io.WriteString(w, "hello, devpod with tests!\n")
}

func RandomErrorServer(w http.ResponseWriter, req *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *MainTestSuite) Test_HelloServer_WritesHelloWorld() {

HelloServer(w, req)

w.AssertCalled(s.T(), "Write", []byte("hello, world!\n"))
w.AssertCalled(s.T(), "Write", []byte("hello, devpod with tests!\n"))
}

func (s *MainTestSuite) Test_HelloServer_Waits_WhenDelayIsPresent() {
Expand Down
4 changes: 2 additions & 2 deletions watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# watch the go files and continously deploy the service
make linux
skaffold run -p dev
reflex -r "\.go$" -- bash -c 'make linux && skaffold run -p dev'
UUID=$(uuidgen) skaffold run -p dev
reflex -r "\.go$" -- bash -c 'make linux && make unittest && UUID=$(uuidgen) skaffold run -p dev'

0 comments on commit 2524f1a

Please sign in to comment.