2020-05-19 17:11:31 +02:00
|
|
|
package context
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
|
|
"gotest.tools/v3/golden"
|
|
|
|
|
2020-05-20 15:06:08 +02:00
|
|
|
"github.com/docker/api/tests/framework"
|
2020-05-19 17:11:31 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type ContextSuite struct {
|
2020-05-20 15:06:08 +02:00
|
|
|
framework.CliSuite
|
2020-05-19 17:11:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (sut *ContextSuite) TestLs() {
|
2020-05-20 15:06:08 +02:00
|
|
|
err := runList(sut.Context())
|
2020-05-19 17:11:31 +02:00
|
|
|
require.Nil(sut.T(), err)
|
2020-05-20 15:06:08 +02:00
|
|
|
golden.Assert(sut.T(), sut.GetStdOut(), "ls-out.golden")
|
2020-05-19 17:11:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestPs(t *testing.T) {
|
|
|
|
suite.Run(t, new(ContextSuite))
|
|
|
|
}
|