@@ -34,6 +34,7 @@ func InitEtcd(setdir, setkeys []string, port string) *EtcdHandle {
3434 return controllerHandle
3535}
3636
37+ // SetSingle sets a key and value into a test etcd instance.
3738func SetSingle (t * testing.T , key string , value string , port string ) {
3839 c := etcdClient (port )
3940 _ , err := c .Set (key , value , 0 )
@@ -52,7 +53,7 @@ func SetEtcd(t *testing.T, keys []string, values []string, c *etcd.Client) {
5253 }
5354}
5455
55- // Verify an etcd key exists
56+ // VerifyEtcdKey verifies that an etcd key exists.
5657func VerifyEtcdKey (t * testing.T , key string , port string ) {
5758 c := etcdClient (port )
5859 _ , err := c .Get (key , true , true )
@@ -61,15 +62,15 @@ func VerifyEtcdKey(t *testing.T, key string, port string) {
6162 }
6263}
6364
64- // Verify the value of an etcd key
65- func VerifyEtcdValue (t * testing.T , key string , expected_value string , port string ) {
65+ // VerifyEtcdValue verifies the value of an etcd key.
66+ func VerifyEtcdValue (t * testing.T , key string , expectedValue string , port string ) {
6667 c := etcdClient (port )
6768 result , err := c .Get (key , true , true )
6869 if err != nil {
6970 t .Fatal (err )
7071 }
71- if result .Node .Value != expected_value {
72- t .Errorf (key + ": expected '" + expected_value + "', got '" + result .Node .Value + "'." )
72+ if result .Node .Value != expectedValue {
73+ t .Errorf (key + ": expected '" + expectedValue + "', got '" + result .Node .Value + "'." )
7374 }
7475}
7576
0 commit comments