Browse Source

etcdhttp: add test for expiration time

Jonathan Boulle 11 years ago
parent
commit
ef0ba361df
1 changed files with 11 additions and 0 deletions
  1. 11 0
      etcdserver/server_test.go

+ 11 - 0
etcdserver/server_test.go

@@ -144,6 +144,17 @@ func TestApply(t *testing.T) {
 				},
 			},
 		},
+		// POST ==> Create, with expiration
+		{
+			pb.Request{Method: "POST", Id: 1, Expiration: 1337},
+			Response{Event: &store.Event{}},
+			[]action{
+				action{
+					name:   "Create",
+					params: []interface{}{"", false, "", true, time.Unix(0, 1337)},
+				},
+			},
+		},
 		// PUT ==> Set
 		{
 			pb.Request{Method: "PUT", Id: 1},