Get CreatedAt from containerd instead of maintaining it ourselves.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -46,9 +46,6 @@ type Metadata struct {
|
||||
Name string
|
||||
// Config is the CRI sandbox config.
|
||||
Config *runtime.PodSandboxConfig
|
||||
// CreatedAt is the created timestamp.
|
||||
// TODO(random-liu): Use containerd container CreatedAt (containerd#933)
|
||||
CreatedAt int64
|
||||
// Pid is the process id of the sandbox.
|
||||
Pid uint32
|
||||
// NetNSPath is the network namespace used by the sandbox.
|
||||
|
||||
@@ -19,7 +19,6 @@ package sandbox
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||
@@ -37,7 +36,6 @@ func TestMetadataEncodeDecode(t *testing.T) {
|
||||
Attempt: 1,
|
||||
},
|
||||
},
|
||||
CreatedAt: time.Now().UnixNano(),
|
||||
}
|
||||
assert := assertlib.New(t)
|
||||
data, err := meta.Encode()
|
||||
|
||||
@@ -18,7 +18,6 @@ package sandbox
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||
@@ -40,7 +39,6 @@ func TestSandboxStore(t *testing.T) {
|
||||
Attempt: 1,
|
||||
},
|
||||
},
|
||||
CreatedAt: time.Now().UnixNano(),
|
||||
Pid: 1001,
|
||||
NetNSPath: "TestNetNS-1",
|
||||
},
|
||||
@@ -55,7 +53,6 @@ func TestSandboxStore(t *testing.T) {
|
||||
Attempt: 2,
|
||||
},
|
||||
},
|
||||
CreatedAt: time.Now().UnixNano(),
|
||||
Pid: 1002,
|
||||
NetNSPath: "TestNetNS-2",
|
||||
},
|
||||
@@ -70,7 +67,6 @@ func TestSandboxStore(t *testing.T) {
|
||||
Attempt: 3,
|
||||
},
|
||||
},
|
||||
CreatedAt: time.Now().UnixNano(),
|
||||
Pid: 1003,
|
||||
NetNSPath: "TestNetNS-3",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user