| Index: common/api/dm/service/v1/datastore_embed_test.go
|
| diff --git a/common/api/dm/service/v1/datastore_embed_test.go b/common/api/dm/service/v1/datastore_embed_test.go
|
| index 61595e8d7c6257f9d7f56c3bbab128e9a158af86..4ce3675aa18ac0ea45c813b3e81dfafdd3b7418d 100644
|
| --- a/common/api/dm/service/v1/datastore_embed_test.go
|
| +++ b/common/api/dm/service/v1/datastore_embed_test.go
|
| @@ -53,50 +53,3 @@ func TestAttemptID(t *testing.T) {
|
| })
|
| })
|
| }
|
| -
|
| -func TestExecutionID(t *testing.T) {
|
| - t.Parallel()
|
| -
|
| - Convey("Test Execution_ID DM encoding", t, func() {
|
| - Convey("render", func() {
|
| - eid := NewExecutionID("", 0, 0)
|
| - So(eid.DMEncoded(), ShouldEqual, "|ffffffff|ffffffff")
|
| -
|
| - eid.Quest = "moo"
|
| - So(eid.DMEncoded(), ShouldEqual, "moo|ffffffff|ffffffff")
|
| -
|
| - eid.Id = 10
|
| - So(eid.DMEncoded(), ShouldEqual, "moo|ffffffff|fffffff5")
|
| -
|
| - eid.Attempt = 1
|
| - So(eid.DMEncoded(), ShouldEqual, "moo|fffffffe|fffffff5")
|
| -
|
| - p, err := eid.ToProperty()
|
| - So(err, ShouldBeNil)
|
| - So(p, ShouldResemble, datastore.MkPropertyNI("moo|fffffffe|fffffff5"))
|
| - })
|
| -
|
| - Convey("parse", func() {
|
| - Convey("good", func() {
|
| - eid := &Execution_ID{}
|
| - So(eid.SetDMEncoded("something|fffffffe|fffffff5"), ShouldBeNil)
|
| - So(eid, ShouldResemble, NewExecutionID("something", 1, 10))
|
| -
|
| - So(eid.FromProperty(datastore.MkPropertyNI("wat|ffffffff|fffffffa")), ShouldBeNil)
|
| - So(eid, ShouldResemble, NewExecutionID("wat", 0, 5))
|
| - })
|
| -
|
| - Convey("err", func() {
|
| - eid := &Execution_ID{}
|
| - So(eid.SetDMEncoded("somethingfatsrnt"), ShouldErrLike, "unable to parse")
|
| - So(eid.SetDMEncoded("something|cat|ffffffff|bob"), ShouldErrLike, `strconv.ParseUint: parsing "cat"`)
|
| - So(eid.SetDMEncoded("something|cat|ffffffff"), ShouldErrLike, `strconv.ParseUint: parsing "cat"`)
|
| - So(eid.SetDMEncoded("something|ffffffff|cat"), ShouldErrLike, `strconv.ParseUint: parsing "cat"`)
|
| - So(eid.SetDMEncoded(""), ShouldErrLike, "unable to parse")
|
| - So(eid.SetDMEncoded("somethingffffffff"), ShouldErrLike, "unable to parse")
|
| - So(eid.FromProperty(datastore.MkPropertyNI(100)), ShouldErrLike, "wrong type")
|
| - })
|
| -
|
| - })
|
| - })
|
| -}
|
|
|