def test_make_channel_artifacts(monkeypatch): monkeypatch.setattr('gen.installer.bash.make_installer_docker', mock_make_installer_docker) monkeypatch.setattr('gen.installer.aws.get_cloudformation_s3_url', mock_get_cf_s3_url) metadata = { 'commit': 'sha-1', 'tag': 'test_tag', 'bootstrap_dict': { None: 'bootstrap_id', 'ee': 'ee_bootstrap_id' }, 'all_bootstraps': { None: 'bootstrap_id', 'ee': 'ee_bootstrap_id', 'installer': 'installer_bootstrap_id', 'ee.installer': 'ee_installer_bootstrap_id' }, 'repo_channel_path': 'r_path/channel', 'channel_commit_path': 'r_path/channel/commit/sha-1', 'repository_path': 'r_path', 'storage_urls': { 'aws': 'https://aws.example.com/', 'azure': 'https://azure.example.com/' }, 'repository_url': 'https://aws.example.com/r_path' } channel_artifacts = release.make_channel_artifacts(metadata) # Validate the artifacts are vaguely useful for artifact in channel_artifacts: assert 'local_path' in artifact or 'local_content' in artifact assert 'reproducible_path' in artifact or 'channel_path' in artifact
def test_make_channel_artifacts(monkeypatch): monkeypatch.setattr("gen.installer.bash.make_installer_docker", mock_make_installer_docker) monkeypatch.setattr("gen.installer.aws.get_cloudformation_s3_url", mock_get_cf_s3_url) metadata = { "commit": "sha-1", "tag": "test_tag", "bootstrap_dict": {None: "bootstrap_id", "ee": "ee_bootstrap_id"}, "all_bootstraps": { None: "bootstrap_id", "ee": "ee_bootstrap_id", "installer": "installer_bootstrap_id", "ee.installer": "ee_installer_bootstrap_id", }, "repo_channel_path": "r_path/channel", "channel_commit_path": "r_path/channel/commit/sha-1", "repository_path": "r_path", "storage_urls": {"aws": "https://aws.example.com/", "azure": "https://azure.example.com/"}, "repository_url": "https://aws.example.com/r_path", } channel_artifacts = release.make_channel_artifacts(metadata) # Validate the artifacts are vaguely useful for artifact in channel_artifacts: assert "local_path" in artifact or "local_content" in artifact assert "reproducible_path" in artifact or "channel_path" in artifact
def test_make_channel_artifacts(monkeypatch): logging.basicConfig(level=logging.DEBUG) monkeypatch.setattr('gen.build_deploy.bash.make_installer_docker', mock_make_installer_docker) monkeypatch.setattr('gen.build_deploy.aws.get_cloudformation_s3_url', mock_get_cf_s3_url) monkeypatch.setattr('gen.build_deploy.azure.get_download_url', mock_get_azure_download_url) monkeypatch.setattr('pkgpanda.util.make_tar.__code__', mock_make_tar.__code__) metadata = { 'commit': 'sha-1', 'tag': 'test_tag', 'bootstrap_dict': { None: 'bootstrap_id', 'downstream': 'downstream_bootstrap_id' }, 'all_bootstraps': { None: 'bootstrap_id', 'downstream': 'downstream_bootstrap_id', 'installer': 'installer_bootstrap_id', 'downstream.installer': 'downstream_installer_bootstrap_id' }, 'complete_dict': { None: { 'bootstrap': 'bootstrap_id', 'packages': ['package--version'], }, 'downstream': { 'bootstrap': 'downstream_bootstrap_id', 'packages': ['downstream-package--version'], }, }, 'all_completes': { None: { 'bootstrap': 'bootstrap_id', 'packages': ['package--version'], }, 'downstream': { 'bootstrap': 'downstream_bootstrap_id', 'packages': ['downstream-package--version'], }, 'installer': { 'bootstrap': 'installer_bootstrap_id', 'packages': ['installer-package--version'], }, 'downstream.installer': { 'bootstrap': 'downstream_installer_bootstrap_id', 'packages': ['downstream-installer-package--version'], }, }, 'build_name': 'r_path/channel', 'reproducible_artifact_path': 'r_path/channel/commit/sha-1', 'repository_path': 'r_path', 'storage_urls': { 'aws': 'https://aws.example.com/', 'azure': 'https://azure.example.com/' }, 'repository_url': 'https://aws.example.com/r_path' } channel_artifacts = release.make_channel_artifacts(metadata) # Validate the artifacts are vaguely useful for artifact in channel_artifacts: assert 'local_path' in artifact or 'local_content' in artifact assert 'reproducible_path' in artifact or 'channel_path' in artifact
def test_make_channel_artifacts(monkeypatch, release_config_aws): logging.basicConfig(level=logging.DEBUG) monkeypatch.setattr('gen.build_deploy.bash.make_installer_docker', mock_make_installer_docker) monkeypatch.setattr('pkgpanda.util.make_tar.__code__', mock_make_tar.__code__) metadata = { 'commit': 'sha-1', 'tag': 'test_tag', 'bootstrap_dict': { None: 'bootstrap_id', 'downstream': 'downstream_bootstrap_id' }, 'all_bootstraps': { None: 'bootstrap_id', 'downstream': 'downstream_bootstrap_id', 'installer': 'installer_bootstrap_id', 'downstream.installer': 'downstream_installer_bootstrap_id' }, 'complete_dict': { None: { 'bootstrap': 'bootstrap_id', 'packages': ['package--version'], }, 'downstream': { 'bootstrap': 'downstream_bootstrap_id', 'packages': ['downstream-package--version'], }, }, 'all_completes': { None: { 'bootstrap': 'bootstrap_id', 'packages': ['package--version'], }, 'downstream': { 'bootstrap': 'downstream_bootstrap_id', 'packages': ['downstream-package--version'], }, 'installer': { 'bootstrap': 'installer_bootstrap_id', 'packages': ['installer-package--version'], }, 'downstream.installer': { 'bootstrap': 'downstream_installer_bootstrap_id', 'packages': ['downstream-installer-package--version'], }, }, 'build_name': 'r_path/channel', 'reproducible_artifact_path': 'r_path/channel/commit/sha-1', 'repository_path': 'r_path', 'storage_urls': { 'aws': 'https://aws.example.com/', 'azure': 'https://azure.example.com/' }, 'repository_url': 'https://aws.example.com/r_path', 'cloudformation_s3_url_full': 'https://s3.foobar.com/biz/r_path/channel/commit/sha-1', 'azure_download_url': 'https://azure.example.com' } channel_artifacts = release.make_channel_artifacts(metadata) # Validate the artifacts are vaguely useful for artifact in channel_artifacts: assert 'local_path' in artifact or 'local_content' in artifact assert 'reproducible_path' in artifact or 'channel_path' in artifact