diff --git a/app/kumactl/cmd/get/get_fault_injections_test.go b/app/kumactl/cmd/get/get_fault_injections_test.go index 7d1b0958364a..6aeeb398efde 100644 --- a/app/kumactl/cmd/get/get_fault_injections_test.go +++ b/app/kumactl/cmd/get/get_fault_injections_test.go @@ -112,9 +112,10 @@ var _ = Describe("kumactl get fault-injections", func() { var rootCmd *cobra.Command var buf *bytes.Buffer var store core_store.ResourceStore - + var t1 time.Time BeforeEach(func() { // setup + t1, _ = time.Parse(time.RFC3339, "2018-07-17T16:05:36.995+00:00") rootCtx = &kumactl_cmd.RootContext{ Runtime: kumactl_cmd.RootRuntime{ Now: time.Now, @@ -127,7 +128,7 @@ var _ = Describe("kumactl get fault-injections", func() { store = memory_resources.NewStore() for _, ds := range faultInjectionResources { - err := store.Create(context.Background(), ds, core_store.CreateBy(core_model.MetaToResourceKey(ds.GetMeta()))) + err := store.Create(context.Background(), ds, core_store.CreateBy(core_model.MetaToResourceKey(ds.GetMeta())), core_store.CreatedAt(t1)) Expect(err).ToNot(HaveOccurred()) } diff --git a/app/kumactl/cmd/get/testdata/get-fault-injections.golden.json b/app/kumactl/cmd/get/testdata/get-fault-injections.golden.json index f7a7fbadf43a..e3c2d2398cd5 100644 --- a/app/kumactl/cmd/get/testdata/get-fault-injections.golden.json +++ b/app/kumactl/cmd/get/testdata/get-fault-injections.golden.json @@ -4,6 +4,8 @@ "type": "FaultInjection", "mesh": "default", "name": "fi1", + "creationTime": "2018-07-17T16:05:36.995Z", + "modificationTime": "2018-07-17T16:05:36.995Z", "sources": [ { "match": { @@ -38,6 +40,8 @@ "type": "FaultInjection", "mesh": "default", "name": "fi2", + "creationTime": "2018-07-17T16:05:36.995Z", + "modificationTime": "2018-07-17T16:05:36.995Z", "sources": [ { "match": { diff --git a/app/kumactl/cmd/get/testdata/get-fault-injections.golden.yaml b/app/kumactl/cmd/get/testdata/get-fault-injections.golden.yaml index bf771d83dc9d..bb458baaadb7 100644 --- a/app/kumactl/cmd/get/testdata/get-fault-injections.golden.yaml +++ b/app/kumactl/cmd/get/testdata/get-fault-injections.golden.yaml @@ -9,10 +9,12 @@ items: responseBandwidth: limit: 50 mbps percentage: 50 + creationTime: 2018-07-17T16:05:36.995Z destinations: - match: service: backend mesh: default + modificationTime: 2018-07-17T16:05:36.995Z name: fi1 sources: - match: @@ -29,10 +31,12 @@ items: responseBandwidth: limit: 50 mbps percentage: 50 + creationTime: 2018-07-17T16:05:36.995Z destinations: - match: service: redis mesh: default + modificationTime: 2018-07-17T16:05:36.995Z name: fi2 sources: - match: