def __init__(self, namespace, region, download_path, repositories, envname, colour, output_file, use_latest_chart_version = False): self.namespace = namespace self.region = region self.download_path = download_path self.envname = envname self.colour = colour self.output_file = output_file self.use_latest_chart_version = use_latest_chart_version self.reckoner_data = OrderedDict({ "namespace": self.namespace, "repositories": { "stable": { "url": "https://kubernetes-charts.storage.googleapis.com/" } }, "minimum_versions": { "helm": "2.10.0", "autohelm": "0.6.5" }, "charts": OrderedDict() }) self.repository_charts = {} self.repository_chart_versions = {} for repository, url in repositories.items(): self.reckoner_data['repositories'][repository] = {"url": url} self.repository_charts[repository] = {} for chart_name, chart_data in repo_index(url)['entries'].items(): self.repository_charts[repository][chart_name] = chart_data
def test_wrong_scheme(self): with self.assertRaises(repo.SchemeError): repo.repo_index('ssh://test')