mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Merge pull request #9346 from jfrazelle/fix-events-test
fix tests where cmd function does not exist
This commit is contained in:
		
						commit
						75b47467aa
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -286,8 +286,14 @@ func TestEventsImageImport(t *testing.T) {
 | 
			
		|||
 | 
			
		||||
func TestEventsFilters(t *testing.T) {
 | 
			
		||||
	since := time.Now().Unix()
 | 
			
		||||
	cmd(t, "run", "--rm", "busybox", "true")
 | 
			
		||||
	cmd(t, "run", "--rm", "busybox", "true")
 | 
			
		||||
	out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "--rm", "busybox", "true"))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(out, err)
 | 
			
		||||
	}
 | 
			
		||||
	out, _, err = runCommandWithOutput(exec.Command(dockerBinary, "run", "--rm", "busybox", "true"))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(out, err)
 | 
			
		||||
	}
 | 
			
		||||
	eventsCmd := exec.Command(dockerBinary, "events", fmt.Sprintf("--since=%d", since), fmt.Sprintf("--until=%d", time.Now().Unix()), "--filter", "event=die")
 | 
			
		||||
	out, exitCode, err := runCommandWithOutput(eventsCmd)
 | 
			
		||||
	if exitCode != 0 || err != nil {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue