def test_make_stable_artifacts(monkeypatch, tmpdir): monkeypatch.setattr("release.do_build_packages", mock_do_build_packages) monkeypatch.setattr("gen.build_deploy.util.dcos_image_commit", "commit_sha1") with tmpdir.as_cwd(): metadata = release.make_stable_artifacts("http://test") assert metadata == stable_artifacts_metadata # Check that a BuildError is propogated monkeypatch.setattr("release.do_build_packages", mock_failed_build_packages) with pytest.raises(BuildError): release.make_stable_artifacts("http://test")
def test_make_stable_artifacts(monkeypatch, tmpdir): monkeypatch.setattr("release.do_build_packages", mock_do_build_packages) monkeypatch.setattr("gen.installer.util.dcos_image_commit", "commit_sha1") with tmpdir.as_cwd(): metadata = release.make_stable_artifacts("http://test") assert metadata == stable_artifacts_metadata