Improvement: Docker one shot error message (#1666)
* In one shot, user would only specify one container?
This commit is contained in:
parent
0708073a0c
commit
21e5b0d6d0
|
@ -321,7 +321,7 @@ func (d *DockerSource) OneShotAcquisition(out chan types.Event, t *tomb.Tomb) er
|
||||||
t.Kill(nil)
|
t.Kill(nil)
|
||||||
|
|
||||||
if !foundOne {
|
if !foundOne {
|
||||||
return fmt.Errorf("no docker found, can't run one shot acquisition")
|
return fmt.Errorf("no container found named: %s, can't run one shot acquisition", d.Config.ContainerName[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -267,7 +267,7 @@ func TestOneShot(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
dsn: "docker://non_exist_docker",
|
dsn: "docker://non_exist_docker",
|
||||||
expectedErr: "no docker found, can't run one shot acquisition",
|
expectedErr: "no container found named: non_exist_docker, can't run one shot acquisition",
|
||||||
expectedOutput: "",
|
expectedOutput: "",
|
||||||
expectedLines: 0,
|
expectedLines: 0,
|
||||||
logType: "test",
|
logType: "test",
|
||||||
|
|
Loading…
Reference in a new issue