diff options
author | Seb <[email protected]> | 2022-07-14 17:11:57 +0200 |
---|---|---|
committer | Seb <[email protected]> | 2022-07-15 13:28:14 +0200 |
commit | 550e6755806bf3b4fc5d0fa8fd792db37c92bc1f (patch) | |
tree | 53e57e593596beaa4520eaacd98d367763159633 | |
parent | b7cda314ebdde09be5c6eba1f8ed02c24d197904 (diff) |
linter updates
Signed-off-by: Seb <[email protected]>
-rw-r--r-- | roadrunner/roadrunner.go | 1 | ||||
-rw-r--r-- | roadrunner/roadrunner_test.go | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/roadrunner/roadrunner.go b/roadrunner/roadrunner.go index f7499d96..893ba100 100644 --- a/roadrunner/roadrunner.go +++ b/roadrunner/roadrunner.go @@ -95,6 +95,7 @@ func (rr *RR) CurrentState() fsm.State { // Stop stops roadrunner func (rr *RR) Stop() error { rr.stop <- struct{}{} + return rr.container.Stop() } diff --git a/roadrunner/roadrunner_test.go b/roadrunner/roadrunner_test.go index 16ff4f61..66c7e380 100644 --- a/roadrunner/roadrunner_test.go +++ b/roadrunner/roadrunner_test.go @@ -28,7 +28,7 @@ endure: func makeConfig(t *testing.T, configYaml string) string { cfgFile := os.TempDir() + "/.rr.yaml" - err := os.WriteFile(cfgFile, []byte(configYaml), 0644) + err := os.WriteFile(cfgFile, []byte(configYaml), 0600) assert.Nil(t, err) return cfgFile @@ -55,12 +55,14 @@ func TestServeStop(t *testing.T) { var serveError error stopped := false + go func() { serveError = rr.Serve() stopped = true }() assert.Equal(t, rr.CurrentState(), fsm.Initialized) + for rr.CurrentState() != fsm.Started { time.Sleep(20 * time.Millisecond) } |