Change link for missing module or missing provider (#1724)

Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
This commit is contained in:
Arel Rabinowitz
2024-06-16 18:46:37 +03:00
committed by GitHub
parent e67cbc448c
commit 5667df4969
3 changed files with 5 additions and 4 deletions

View File

@@ -432,7 +432,7 @@ func TestInitProviderNotFound(t *testing.T) {
}
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)
}
})
@@ -493,7 +493,8 @@ func TestInitProviderNotFound(t *testing.T) {
│ tofu providers
│ 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
`