'Calling :func:`upload_packages` creates repositories for supported
distributions.'

def test_repositories_created(self):

    repo_contents = {'results/omnibus/0.3.3.dev1/centos-7/clusterhq-flocker-cli-0.3.3-0.dev.1.noarch.rpm': '', 'results/omnibus/0.3.3.dev1/centos-7/clusterhq-flocker-node-0.3.3-0.dev.1.noarch.rpm': '', 'results/omnibus/0.3.3.dev1/centos-7/clusterhq-flocker-docker-plugin-0.3.3-0.dev.1.noarch.rpm': '', 'results/omnibus/0.3.3.dev1/centos-7/clusterhq-python-flocker-0.3.3-0.dev.1.x86_64.rpm': '', 'results/omnibus/0.3.3.dev1/ubuntu-14.04/clusterhq-flocker-cli_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-14.04/clusterhq-flocker-node_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-14.04/clusterhq-flocker-docker-plugin_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-14.04/clusterhq-python-flocker_0.3.3-0.dev.1_amd64.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-16.04/clusterhq-flocker-cli_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-16.04/clusterhq-flocker-node_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-16.04/clusterhq-flocker-docker-plugin_0.3.3-0.dev.1_all.deb': '', 'results/omnibus/0.3.3.dev1/ubuntu-16.04/clusterhq-python-flocker_0.3.3-0.dev.1_amd64.deb': ''}
    self.upload_packages(aws=self.aws, yum=FakeYum(), scratch_directory=self.scratch_directory, target_bucket=self.target_bucket, version='0.3.3.dev1', build_server=create_fake_repository(self, files=repo_contents), top_level=FLOCKER_PATH)
    expected_files = {'centos-testing/7/x86_64/clusterhq-flocker-cli-0.3.3-0.dev.1.noarch.rpm', 'centos-testing/7/x86_64/clusterhq-flocker-node-0.3.3-0.dev.1.noarch.rpm', 'centos-testing/7/x86_64/clusterhq-flocker-docker-plugin-0.3.3-0.dev.1.noarch.rpm', 'centos-testing/7/x86_64/clusterhq-python-flocker-0.3.3-0.dev.1.x86_64.rpm', 'centos-testing/7/x86_64/repodata/repomod.xml', 'centos-testing/7/x86_64/repodata/<newhash>-metadata.xml', 'ubuntu-testing/14.04/amd64/clusterhq-flocker-cli_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/14.04/amd64/clusterhq-flocker-node_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/14.04/amd64/clusterhq-flocker-docker-plugin_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/14.04/amd64/clusterhq-python-flocker_0.3.3-0.dev.1_amd64.deb', 'ubuntu-testing/14.04/amd64/Packages.gz', 'ubuntu-testing/14.04/amd64/Release', 'ubuntu-testing/16.04/amd64/clusterhq-flocker-cli_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/16.04/amd64/clusterhq-flocker-node_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/16.04/amd64/clusterhq-flocker-docker-plugin_0.3.3-0.dev.1_all.deb', 'ubuntu-testing/16.04/amd64/clusterhq-python-flocker_0.3.3-0.dev.1_amd64.deb', 'ubuntu-testing/16.04/amd64/Packages.gz', 'ubuntu-testing/16.04/amd64/Release'}
    files_on_s3 = self.aws.s3_buckets[self.target_bucket].keys()
    self.assertEqual(expected_files, set(files_on_s3))
