Skip to content

Commit

Permalink
* [e2e] to not use github api to fetch provider versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lanfon72 committed Nov 30, 2023
1 parent fa44a0f commit a556491
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions harvester_e2e_tests/fixtures/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ def tf_provider_version(request):
version = request.config.getoption('--terraform-provider-harvester')
if not version:
import requests
return requests.get(
"https://api.github.com/repos/harvester/terraform-provider-harvester/releases/latest"
).json()['name'].lstrip('v')
return version
resp = requests.get("https://registry.terraform.io/v1/providers/harvester/harvester")
versions = resp.json()['versions']
return max(versions, key=parse_version)


@pytest.fixture(scope="session")
Expand Down

0 comments on commit a556491

Please sign in to comment.