mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 17:59:05 -05:00
Change link for missing module or missing provider (#1724)
Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
This commit is contained in:
@@ -432,7 +432,7 @@ func TestInitProviderNotFound(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
oneLineStdout := strings.ReplaceAll(stdout, "\n", " ")
|
oneLineStdout := strings.ReplaceAll(stdout, "\n", " ")
|
||||||
if !strings.Contains(oneLineStdout, `"diagnostic":{"severity":"error","summary":"Failed to query available provider packages","detail":"Could not retrieve the list of available versions for provider hashicorp/nonexist: provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/hashicorp/nonexist\n\nAll modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/nonexist, run the following command:\n tofu providers\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"},"type":"diagnostic"}`) {
|
if !strings.Contains(oneLineStdout, `"diagnostic":{"severity":"error","summary":"Failed to query available provider packages","detail":"Could not retrieve the list of available versions for provider hashicorp/nonexist: provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/hashicorp/nonexist\n\nAll modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/nonexist, run the following command:\n tofu providers\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"},"type":"diagnostic"}`) {
|
||||||
t.Errorf("expected error message is missing from output:\n%s", stdout)
|
t.Errorf("expected error message is missing from output:\n%s", stdout)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -493,7 +493,8 @@ func TestInitProviderNotFound(t *testing.T) {
|
|||||||
│ tofu providers
|
│ tofu providers
|
||||||
│
|
│
|
||||||
│ If you believe this provider is missing from the registry, please submit a
|
│ If you believe this provider is missing from the registry, please submit a
|
||||||
│ issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/
|
│ issue on the OpenTofu Registry
|
||||||
|
│ https://github.com/opentofu/registry/issues/new/choose
|
||||||
╵
|
╵
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ func (c *InitCommand) getProviders(ctx context.Context, config *configs.Config,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if provider.Hostname == addrs.DefaultProviderRegistryHost {
|
if provider.Hostname == addrs.DefaultProviderRegistryHost {
|
||||||
suggestion += "\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"
|
suggestion += "\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"
|
||||||
}
|
}
|
||||||
|
|
||||||
diags = diags.Append(tfdiags.Sourceless(
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ func (i *ModuleInstaller) installRegistryModule(ctx context.Context, req *config
|
|||||||
if registry.IsModuleNotFound(err) {
|
if registry.IsModuleNotFound(err) {
|
||||||
suggestion := ""
|
suggestion := ""
|
||||||
if hostname == addrs.DefaultModuleRegistryHost {
|
if hostname == addrs.DefaultModuleRegistryHost {
|
||||||
suggestion = "\n\nIf you believe this module is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"
|
suggestion = "\n\nIf you believe this module is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"
|
||||||
}
|
}
|
||||||
|
|
||||||
diags = diags.Append(&hcl.Diagnostic{
|
diags = diags.Append(&hcl.Diagnostic{
|
||||||
|
|||||||
Reference in New Issue
Block a user