(self)
| 280 | |
| 281 | @pytest.mark.skipif(True, reason="Doesn't work inside a container - FIXME") |
| 282 | def test_import_from_url(self): |
| 283 | # The crappy test HTTP server doesn't handle large files well, so use |
| 284 | # a small file. |
| 285 | tar_size = 10240 |
| 286 | |
| 287 | with self.dummy_tar_stream(n_bytes=tar_size) as tar_data: |
| 288 | with self.temporary_http_file_server(tar_data) as url: |
| 289 | statuses = self.client.import_image( |
| 290 | src=url, repository='test/import-from-url') |
| 291 | |
| 292 | result_text = statuses.splitlines()[-1] |
| 293 | result = json.loads(result_text) |
| 294 | |
| 295 | assert 'error' not in result |
| 296 | |
| 297 | assert 'status' in result |
| 298 | img_id = result['status'] |
| 299 | self.tmp_imgs.append(img_id) |
| 300 | |
| 301 | |
| 302 | @requires_api_version('1.25') |
nothing calls this directly
no test coverage detected