Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #556 from gamechanger/zm-restart-test
Browse files Browse the repository at this point in the history
set up complete time with vm clock
  • Loading branch information
zacharym committed Sep 4, 2015
2 parents 801d1d4 + 7f0e258 commit 9c9ef76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/integration/cli/restart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from nose.tools import nottest

from dusty.compiler.spec_assembler import get_all_repos
from dusty import constants
from dusty.source import Repo
from dusty.subprocess import check_output_demoted
from ...testcases import DustyIntegrationTestCase
from ...fixtures import specs_fixture_with_depends

Expand All @@ -20,7 +22,7 @@ def setUp(self):
self._set_up_fake_local_repo(path=repo.remote_path)
self.run_command('bundles activate bundle-a bundle-b')
self.run_command('up')
time.sleep(.1)
time.sleep(.5)
self.up_complete_time = datetime.datetime.utcnow()

def tearDown(self):
Expand All @@ -36,6 +38,10 @@ def assertContainerHasRestarted(self, app_name):
def assertContainerNotRestarted(self, app_name):
self.assertFalse(self.container_has_restarted(app_name))

def vm_current_time(self):
result = check_output_demoted(['docker-machine', 'ssh', constants.VM_MACHINE_NAME, 'date "+%Y-%m-%dT%X.%s"'])
return dateutil.parser.parse(result)

@nottest
def container_has_restarted(self, app_name):
inspected = self.inspect_container(app_name)
Expand Down

0 comments on commit 9c9ef76

Please sign in to comment.