summaryrefslogtreecommitdiff
path: root/internal/state_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-11 14:06:10 +0300
committerGitHub <[email protected]>2021-02-11 14:06:10 +0300
commit8f6cafdc0948a5ea13bf9a811b576aa4b3ef7e4a (patch)
tree92727c3ff8087597bac65eee2c26c9484c98be7f /internal/state_test.go
parent7978c59f0ed286912bfcaec81b76e54532b1a9bf (diff)
parent509abc76a0f7b88678de67843ca79d9052ad8dd6 (diff)
Merge pull request #530 from spiral/release_stabilizationv2.0.0-RC.1
stabilization(RC): rc stabilization
Diffstat (limited to 'internal/state_test.go')
-rwxr-xr-xinternal/state_test.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/internal/state_test.go b/internal/state_test.go
deleted file mode 100755
index a0581d57..00000000
--- a/internal/state_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package internal
-
-import (
- "testing"
-
- "github.com/spiral/roadrunner/v2/pkg/states"
- "github.com/stretchr/testify/assert"
-)
-
-func Test_NewState(t *testing.T) {
- st := NewWorkerState(states.StateErrored)
-
- assert.Equal(t, "errored", st.String())
-
- assert.Equal(t, "inactive", NewWorkerState(states.StateInactive).String())
- assert.Equal(t, "ready", NewWorkerState(states.StateReady).String())
- assert.Equal(t, "working", NewWorkerState(states.StateWorking).String())
- assert.Equal(t, "stopped", NewWorkerState(states.StateStopped).String())
- assert.Equal(t, "undefined", NewWorkerState(1000).String())
-}
-
-func Test_IsActive(t *testing.T) {
- assert.False(t, NewWorkerState(states.StateInactive).IsActive())
- assert.True(t, NewWorkerState(states.StateReady).IsActive())
- assert.True(t, NewWorkerState(states.StateWorking).IsActive())
- assert.False(t, NewWorkerState(states.StateStopped).IsActive())
- assert.False(t, NewWorkerState(states.StateErrored).IsActive())
-}