Skip to content

Commit

Permalink
No bug: [taskgraph] Simplify one of the docker tests; r=dustin
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D17010

--HG--
extra : moz-landing-system : lando
  • Loading branch information
tomprince committed Jan 18, 2019
1 parent ecf5614 commit 969f43d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions taskcluster/taskgraph/test/test_util_docker.py
Expand Up @@ -25,8 +25,6 @@ class TestDocker(unittest.TestCase):

def test_generate_context_hash(self):
tmpdir = tempfile.mkdtemp()
old_GECKO = docker.GECKO
docker.GECKO = tmpdir
try:
os.makedirs(os.path.join(tmpdir, 'docker', 'my-image'))
p = os.path.join(tmpdir, 'docker', 'my-image', 'Dockerfile')
Expand All @@ -38,13 +36,12 @@ def test_generate_context_hash(self):
f.write("data\n")
os.chmod(p, MODE_STANDARD)
self.assertEqual(
docker.generate_context_hash(docker.GECKO,
os.path.join(docker.GECKO, 'docker/my-image'),
docker.generate_context_hash(tmpdir,
os.path.join(tmpdir, 'docker/my-image'),
'my-image'),
'e61e675ce05e8c11424437db3f1004079374c1a5fe6ad6800346cebe137b0797'
)
finally:
docker.GECKO = old_GECKO
shutil.rmtree(tmpdir)

def test_docker_image_explicit_registry(self):
Expand Down

0 comments on commit 969f43d

Please sign in to comment.