command/e2etest: update "init" tests for abbreviated provider addresses

We're now longer showing the default registry hostname as part of
addresses coming from that registry.
This commit is contained in:
Martin Atkins 2020-04-03 13:59:42 -07:00
parent 5852a5c33d
commit a6f63c4891
3 changed files with 13 additions and 13 deletions

View File

@ -40,11 +40,11 @@ func TestPlanApplyInAutomation(t *testing.T) {
// Make sure we actually downloaded the plugins, rather than picking up
// copies that might be already installed globally on the system.
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/template v") {
if !strings.Contains(stdout, "Installing hashicorp/template v") {
t.Errorf("template provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/null v") {
if !strings.Contains(stdout, "Installing hashicorp/null v") {
t.Errorf("null provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
@ -135,11 +135,11 @@ func TestAutoApplyInAutomation(t *testing.T) {
// Make sure we actually downloaded the plugins, rather than picking up
// copies that might be already installed globally on the system.
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/template v") {
if !strings.Contains(stdout, "Installing hashicorp/template v") {
t.Errorf("template provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/null v") {
if !strings.Contains(stdout, "Installing hashicorp/null v") {
t.Errorf("null provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
@ -202,11 +202,11 @@ func TestPlanOnlyInAutomation(t *testing.T) {
// Make sure we actually downloaded the plugins, rather than picking up
// copies that might be already installed globally on the system.
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/template v") {
if !strings.Contains(stdout, "Installing hashicorp/template v") {
t.Errorf("template provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/null v") {
if !strings.Contains(stdout, "Installing hashicorp/null v") {
t.Errorf("null provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}

View File

@ -39,12 +39,12 @@ func TestInitProviders(t *testing.T) {
t.Errorf("success message is missing from output:\n%s", stdout)
}
if !strings.Contains(stdout, "- Installing registry.terraform.io/hashicorp/template v") {
if !strings.Contains(stdout, "- Installing hashicorp/template v") {
t.Errorf("provider download message is missing from output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
if !strings.Contains(stdout, "* registry.terraform.io/hashicorp/template: version = ") {
if !strings.Contains(stdout, "* hashicorp/template: version = ") {
t.Errorf("provider pinning recommendation is missing from output:\n%s", stdout)
}
@ -73,7 +73,7 @@ func TestInitProvidersInternal(t *testing.T) {
t.Errorf("success message is missing from output:\n%s", stdout)
}
if strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/terraform") {
if strings.Contains(stdout, "Installing hashicorp/terraform") {
// Shouldn't have downloaded anything with this config, because the
// provider is built in.
t.Errorf("provider download message appeared in output:\n%s", stdout)
@ -91,7 +91,7 @@ func TestInitProvidersVendored(t *testing.T) {
// This test will try to reach out to registry.terraform.io as one of the
// possible installation locations for
// registry.terraform.io/hashicorp/null, where it will find that
// hashicorp/null, where it will find that
// versions do exist but will ultimately select the version that is
// vendored due to the version constraint.
skipIfCannotAccessNetwork(t)
@ -123,7 +123,7 @@ func TestInitProvidersVendored(t *testing.T) {
t.Errorf("success message is missing from output:\n%s", stdout)
}
if !strings.Contains(stdout, "- Installing registry.terraform.io/hashicorp/null v1.0.0+local") {
if !strings.Contains(stdout, "- Installing hashicorp/null v1.0.0+local") {
t.Errorf("provider download message is missing from output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}

View File

@ -38,11 +38,11 @@ func TestPrimarySeparatePlan(t *testing.T) {
// Make sure we actually downloaded the plugins, rather than picking up
// copies that might be already installed globally on the system.
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/template v") {
if !strings.Contains(stdout, "Installing hashicorp/template v") {
t.Errorf("template provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}
if !strings.Contains(stdout, "Installing registry.terraform.io/hashicorp/null v") {
if !strings.Contains(stdout, "Installing hashicorp/null v") {
t.Errorf("null provider download message is missing from init output:\n%s", stdout)
t.Logf("(this can happen if you have a copy of the plugin in one of the global plugin search dirs)")
}