|
@@ -8,7 +8,6 @@ import (
|
|
"testing"
|
|
"testing"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
- "github.com/docker/docker/pkg/jsonlog"
|
|
|
|
"github.com/docker/docker/pkg/term"
|
|
"github.com/docker/docker/pkg/term"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
)
|
|
@@ -115,8 +114,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
|
From: "From",
|
|
From: "From",
|
|
Status: "status",
|
|
Status: "status",
|
|
}: {
|
|
}: {
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(RFC3339NanoFixed)),
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(now.Unix(), 0).Format(RFC3339NanoFixed)),
|
|
},
|
|
},
|
|
// General, with nano precision time
|
|
// General, with nano precision time
|
|
{
|
|
{
|
|
@@ -125,8 +124,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
|
From: "From",
|
|
From: "From",
|
|
Status: "status",
|
|
Status: "status",
|
|
}: {
|
|
}: {
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(RFC3339NanoFixed)),
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(RFC3339NanoFixed)),
|
|
},
|
|
},
|
|
// General, with both times Nano is preferred
|
|
// General, with both times Nano is preferred
|
|
{
|
|
{
|
|
@@ -136,8 +135,8 @@ func TestJSONMessageDisplay(t *testing.T) {
|
|
From: "From",
|
|
From: "From",
|
|
Status: "status",
|
|
Status: "status",
|
|
}: {
|
|
}: {
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
- fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(jsonlog.RFC3339NanoFixed)),
|
|
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(RFC3339NanoFixed)),
|
|
|
|
+ fmt.Sprintf("%v ID: (from From) status\n", time.Unix(0, now.UnixNano()).Format(RFC3339NanoFixed)),
|
|
},
|
|
},
|
|
// Stream over status
|
|
// Stream over status
|
|
{
|
|
{
|