Beispiel #1
0
    def test_get_digest_from_pull(self):
        events = list()
        assert progress_stream.get_digest_from_pull(events) is None

        digest = "sha256:abcd"
        events = [
            {"status": "..."},
            {"status": "..."},
            {"status": "Digest: %s" % digest},
            {"status": "..."},
        ]
        assert progress_stream.get_digest_from_pull(events) == digest
Beispiel #2
0
    def test_get_digest_from_pull(self):
        events = list()
        assert progress_stream.get_digest_from_pull(events) is None

        digest = "sha256:abcd"
        events = [
            {"status": "..."},
            {"status": "..."},
            {"status": "Digest: %s" % digest},
            {"status": "..."},
        ]
        assert progress_stream.get_digest_from_pull(events) == digest
def test_get_digest_from_pull():
    digest = "sha256:abcd"
    events = [
        {"status": "..."},
        {"status": "..."},
        {"status": "Digest: %s" % digest},
    ]
    assert progress_stream.get_digest_from_pull(events) == digest
Beispiel #4
0
 def pull_from_remote_repository(self, service, repo, kwargs):
     log.info('Pulling %s (%s) (%s)...' % (service.name, repo, kwargs))
     try:
         output = service.client.pull(repo, **kwargs)
         return progress_stream.get_digest_from_pull(
             stream_output(output, sys.stdout))
     except (StreamOutputError, NotFound) as e:
         log.error(six.text_type(e))
         raise