Skip to content

Commit

Permalink
Merge pull request #24 from yonkornilov/inits-waits-tests
Browse files Browse the repository at this point in the history
closes #23
  • Loading branch information
Yonatan Koren authored Jun 21, 2018
2 parents 55cf949 + e585612 commit ccc13f4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions inits/inits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ func TestStartOpenRC(t *testing.T) {
}
}

func TestWaitForPidfile(t *testing.T) {
expectedErrorMsg := "timed out waiting for pid"
_, err := waitForPid("asdfasdf")
if err == nil {
} else if err.Error() != expectedErrorMsg {
t.Fatalf("Expected error %s, got %s", expectedErrorMsg, err.Error())
}
}

func TestWaitForPid(t *testing.T) {
expectedErrorMsg := "timed out waiting for pidfile"
_, err := waitForPidfile("asdfasdf")
if err == nil {
} else if err.Error() != expectedErrorMsg {
t.Fatalf("Expected error %s, got %s", expectedErrorMsg, err.Error())
}
}

func TestCheckSupervisor(t *testing.T) {
ctx := context.New(true)
init := config.Init{
Expand Down

0 comments on commit ccc13f4

Please # to comment.