github.com/ali-iotechsys/cli@v20.10.0+incompatible/e2e/system/inspect_test.go (about)

     1  package system
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gotest.tools/v3/icmd"
     7  )
     8  
     9  // TestInspectInvalidReference migrated from moby/integration-cli
    10  func TestInspectInvalidReference(t *testing.T) {
    11  	// This test should work on both Windows and Linux
    12  	result := icmd.RunCmd(icmd.Command("docker", "inspect", "FooBar"))
    13  	result.Assert(t, icmd.Expected{
    14  		Out:      "[]",
    15  		Err:      "Error: No such object: FooBar",
    16  		ExitCode: 1,
    17  	})
    18  }