etcdhttp: add test for expiration time

release-2.0
Jonathan Boulle 2014-09-24 15:46:40 -07:00
parent c28fd92d10
commit ef0ba361df
1 changed files with 11 additions and 0 deletions

View File

@ -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},