* Moving from govendor to dep. * Making the pull request template more friendly. * Fixing akward space in PR template. * goimports run on whole project using ` goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./gen-go/*")` source of command: https://gist.github.com/bgentry/fd1ffef7dbde01857f66
24 lines
498 B
Go
24 lines
498 B
Go
package zk
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestModeString(t *testing.T) {
|
|
if fmt.Sprintf("%v", ModeUnknown) != "unknown" {
|
|
t.Errorf("unknown value should be 'unknown'")
|
|
}
|
|
|
|
if fmt.Sprintf("%v", ModeLeader) != "leader" {
|
|
t.Errorf("leader value should be 'leader'")
|
|
}
|
|
|
|
if fmt.Sprintf("%v", ModeFollower) != "follower" {
|
|
t.Errorf("follower value should be 'follower'")
|
|
}
|
|
|
|
if fmt.Sprintf("%v", ModeStandalone) != "standalone" {
|
|
t.Errorf("standlone value should be 'standalone'")
|
|
}
|
|
}
|