mirror of https://github.com/docker/cli.git
Compare commits
3 Commits
4e094e8eba
...
75619555fb
Author | SHA1 | Date |
---|---|---|
MicahKimel | 75619555fb | |
MicahKimel | dd8059925e | |
MicahKimel | 7098aaf6fc |
|
@ -963,7 +963,7 @@ This starts an `ubuntu` container with access to the specified CDI device,
|
||||||
- A valid CDI specification (JSON or YAML file) for the requested device is
|
- A valid CDI specification (JSON or YAML file) for the requested device is
|
||||||
available on the system running the daemon, in one of the configured CDI
|
available on the system running the daemon, in one of the configured CDI
|
||||||
specification directories.
|
specification directories.
|
||||||
- The CDI feature has been enabled in the daemon; see [Enable CDI
|
- The CDI feature has been enabled in the daemon. See [Enable CDI
|
||||||
devices](https://docs.docker.com/reference/cli/dockerd/#enable-cdi-devices).
|
devices](https://docs.docker.com/reference/cli/dockerd/#enable-cdi-devices).
|
||||||
|
|
||||||
### <a name="attach"></a> Attach to STDIN/STDOUT/STDERR (-a, --attach)
|
### <a name="attach"></a> Attach to STDIN/STDOUT/STDERR (-a, --attach)
|
||||||
|
|
|
@ -87,6 +87,25 @@ func TestParseEnvFileNonExistentFile(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test TestParseEnvFile for a badly formatted header
|
||||||
|
func TestParseEnvFileFormattedWithSpace(t *testing.T) {
|
||||||
|
content := `
|
||||||
|
[config 1]
|
||||||
|
foo=bar
|
||||||
|
f=quux
|
||||||
|
`
|
||||||
|
tmpFile := tmpFileWithContent(t, content)
|
||||||
|
|
||||||
|
_, err := ParseEnvFile(tmpFile)
|
||||||
|
if _, ok := err.(ErrBadKey); !ok {
|
||||||
|
t.Fatalf("Expected an ErrBadKey, got [%v]", err)
|
||||||
|
}
|
||||||
|
expectedMessage := "poorly formatted environment: variable '[config 1]' contains whitespaces"
|
||||||
|
if err.Error() != expectedMessage {
|
||||||
|
t.Fatalf("Expected [%v], got [%v]", expectedMessage, err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Test ParseEnvFile for a badly formatted file
|
// Test ParseEnvFile for a badly formatted file
|
||||||
func TestParseEnvFileBadlyFormattedFile(t *testing.T) {
|
func TestParseEnvFileBadlyFormattedFile(t *testing.T) {
|
||||||
content := `foo=bar
|
content := `foo=bar
|
||||||
|
|
Loading…
Reference in New Issue