Skip to content

Commit

Permalink
Minor tweaks to the code to support the labels merge from @whitmo
Browse files Browse the repository at this point in the history
- Corrected some initial linting issues w/ setup.py
- Updated tests/10-deploy-test to properly validate a docker upgrade when
using latest=true, as the metapacakge is no longer whats used so we can
tightly control the version of docker deployed across multiple hosts.
  • Loading branch information
Charles Butler committed Jun 2, 2015
1 parent 3282bae commit a139a48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions hooks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ def pre_install():
Do any setup required before the install hook.
"""
try:
import charmhelpers # noqa
import ansiblecharm # noqa
from path import path # noqa
import charmhelpers # noqa
import ansiblecharm # noqa
from path import path # noqa
except ImportError:
subprocess.check_call(['hooks/setup.sh'])
subprocess.check_call("pip install -r hooks/python-pkgs.txt",
shell=True)

from path import path

#temporary dev hack
# temporary dev hack
for lib in ('src/ansiblecharm', 'src/charmhelpers'):
pth = str(path(os.environ['CHARM_DIR']) / lib)
sys.path.append(pth)
Expand Down
5 changes: 3 additions & 2 deletions tests/10-deploy-test
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ class TestDeployment(unittest.TestCase):

def test_latest_config_option(self):
""" Set config option to latest and verify docker is installed """
self.deployment.configure('docker', {'latest': True})
self.deployment.configure('docker', {'latest': True,
'version': '1.5.0'})
self.deployment.sentry.wait()
command = 'dpkg -l lxc-docker'
command = 'dpkg -l lxc-docker-1.5.0'
output, code = self.docker_unit.run(command)
print(output)
if output.find('ii') == -1:
Expand Down

0 comments on commit a139a48

Please sign in to comment.