Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config json #56

Merged
merged 4 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ouroboros/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def check_credentials():
if environ.get('REPO_USER') and environ.get('REPO_PASS'):
return {'username': environ['REPO_USER'],
'password': environ['REPO_PASS']}
return {}
return None


def pull_latest(image, keep_tag, api_client):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read_reqs(requirements):

setup(
name='ouroboros-cli',
version='0.3.1',
version='0.3.2',
description='Automatically update running docker containers',
long_description=readme(),
long_description_content_type='text/markdown',
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def test_image_check_credentials_no_env_var():
assert image.check_credentials() == {}
assert not image.check_credentials()


def test_image_check_credentials_env_var(mocker):
Expand All @@ -14,7 +14,7 @@ def test_image_check_credentials_env_var(mocker):

def test_image_check_credentials_false_env_var(mocker):
mocker.patch.dict('os.environ', {'REPO_USR': 'test_user', 'REPO_PaSS': 'test_pass'})
assert image.check_credentials() == {}
assert not image.check_credentials()


def test_image_is_up_to_date():
Expand All @@ -32,4 +32,4 @@ def test_remove_exception(mocker, caplog):

image.remove(fake_image, fake_api)
fake_api.remove_image.assert_called_once_with(fake_image)
assert 'Could not clean up image: testcontainer:1.1, reason:' in caplog.text
assert 'Could not clean up image: testcontainer:1.1, reason:' in caplog.text