def METHOD_NAME(
    cdn_certs_and_keys,
    init_and_sync,
    rpm_rpmremote_factory,
    rpm_content_repometadata_files_api,
    rpm_repository_version_api,
    delete_orphans_pre,
):
    """Test sync against CDN.
    1. create repository, appstream remote and sync
        - remote using certificates and tls validation
    2. create repository, baseos remote and sync
        - remote using certificates without tls validation
    3. Check both repositories were synced and both have its own 'productid' content
        - this test covering checking same repo metadata files with different relative paths
    """
    client_cert, client_key, ca_cert = cdn_certs_and_keys
    if not all(cdn_certs_and_keys):
        pytest.skip("CDN Client Cert & Key and CA Cert were not set")
    # 1. create repo, remote and sync them
    appstream_remote = rpm_rpmremote_factory(
        url=RHEL8_APPSTREAM_CDN_URL,
        client_cert=client_cert,
        client_key=client_key,
        ca_cert=ca_cert,
        policy="on_demand",
    )
    repo_appstream, _ = init_and_sync(remote=appstream_remote)
    # 2. create remote and re-sync
    baseos_remote = rpm_rpmremote_factory(
        url=RHEL8_BASEOS_CDN_URL,
        tls_validation=False,
        client_cert=client_cert,
        client_key=client_key,
        policy="on_demand",
    )
    repo_baseos, _ = init_and_sync(remote=baseos_remote)
    # Get all 'productid' repo metadata files
    productids = [
        productid
        for productid in rpm_content_repometadata_files_api.list().results
        if productid.data_type == "productid"
    ]
    # Assert there are two productid content units and they have same checksum
    assert len(productids) == 2
    assert productids[0].checksum == productids[1].checksum
    # Assert each repository has its own productid file
    appstream_repo_ver = rpm_repository_version_api.read(repo_appstream.latest_version_href)
    assert appstream_repo_ver.content_summary.present[PULP_TYPE_REPOMETADATA]["count"] == 1
    baseos_repo_ver = rpm_repository_version_api.read(repo_baseos.latest_version_href)
    assert baseos_repo_ver.content_summary.present[PULP_TYPE_REPOMETADATA]["count"] == 1
    appstream_metadata = rpm_content_repometadata_files_api.list(
        repository_version=appstream_repo_ver.pulp_href
    )
    baseos_metadata = rpm_content_repometadata_files_api.list(
        repository_version=baseos_repo_ver.pulp_href
    )
    assert appstream_metadata.results[0].relative_path != baseos_metadata.results[0].relative_path