diff options
Diffstat (limited to 'internal/config/config_test.go')
| -rw-r--r-- | internal/config/config_test.go | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 2fcfefb..7927664 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -10,26 +10,15 @@ func TestNodeNumber(t *testing.T) { t.Parallel() conf := Config{Nodes: []string{"localhost:1234", "hamburger:4321"}} - num, err := conf.NodeNumber("localhost") - if err != nil { - t.Errorf(err.Error()) - } + num := conf.NodeNumber("localhost") if num != 0 { t.Errorf("localhost should be node number 0 but is %d", num) } - num, err = conf.NodeNumber("hamburger") - if err != nil { - t.Errorf(err.Error()) - } + num = conf.NodeNumber("hamburger") if num != 1 { t.Errorf("hamburger should be node number 1 but is %d", num) } - - _, err = conf.NodeNumber("doener") - if err == nil { - t.Errorf("doener is not a node") - } } func TestIsNode(t *testing.T) { |
