Merge pull request #356 from docker/fix-non-interactive

Add check on exec looking for arguments
This commit is contained in:
Guillaume Tardif 2020-07-07 12:41:44 +02:00 committed by GitHub
commit 16acc36033
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View file

@ -150,6 +150,15 @@ func (s *E2eACISuite) TestACIBackend() {
Expect(output).To(ContainSubstring("GET"))
})
s.T().Run("exec command", func(t *testing.T) {
output := s.NewDockerCommand("exec", testContainerName, "pwd").ExecOrDie()
Expect(output).To(ContainSubstring("/"))
output = s.NewDockerCommand("exec", testContainerName, "echo", "fail_with_argument").ExecOrDie()
Expect(output).To(ContainSubstring("ACI exec command does not accept arguments to the command. " +
"Only the binary should be specified"))
})
s.T().Run("follow logs from nginx", func(t *testing.T) {
timeChan := make(chan time.Time)