소스 검색

etcdhttp: add test for expiration time

Jonathan Boulle 11 년 전
부모
커밋
ef0ba361df
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  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},