mirror of https://github.com/docker/docker-py.git
				
				
				
			Merge pull request #3008 from milas/flaky-tests
test: fix a couple flaky/broken tests
This commit is contained in:
		
						commit
						cf6210316f
					
				| 
						 | 
				
			
			@ -1217,12 +1217,14 @@ class AttachContainerTest(BaseAPIIntegrationTest):
 | 
			
		|||
        data = read_exactly(pty_stdout, next_size)
 | 
			
		||||
        assert data.decode('utf-8') == line
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.timeout(10)
 | 
			
		||||
    def test_attach_no_stream(self):
 | 
			
		||||
        container = self.client.create_container(
 | 
			
		||||
            TEST_IMG, 'echo hello'
 | 
			
		||||
        )
 | 
			
		||||
        self.tmp_containers.append(container)
 | 
			
		||||
        self.client.start(container)
 | 
			
		||||
        self.client.wait(container, condition='not-running')
 | 
			
		||||
        output = self.client.attach(container, stream=False, logs=True)
 | 
			
		||||
        assert output == 'hello\n'.encode(encoding='ascii')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ import pytest
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class TestRegressions(BaseAPIIntegrationTest):
 | 
			
		||||
    @pytest.mark.xfail(True, reason='Docker API always returns chunked resp')
 | 
			
		||||
    def test_443_handle_nonchunked_response_in_stream(self):
 | 
			
		||||
        dfile = io.BytesIO()
 | 
			
		||||
        with pytest.raises(docker.errors.APIError) as exc:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue