mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #93 from opentffoundation/update-get-providers
This commit is contained in:
commit
508c4613f5
@ -30,9 +30,9 @@ type ErrHostNoProviders struct {
|
||||
func (err ErrHostNoProviders) Error() string {
|
||||
switch {
|
||||
case err.HasOtherVersion:
|
||||
return fmt.Sprintf("host %s does not support the provider registry protocol required by this Terraform version, but may be compatible with a different Terraform version", err.Hostname.ForDisplay())
|
||||
return fmt.Sprintf("host %s does not support the provider registry protocol required by this OpenTF version, but may be compatible with a different OpenTF version", err.Hostname.ForDisplay())
|
||||
default:
|
||||
return fmt.Sprintf("host %s does not offer a Terraform provider registry", err.Hostname.ForDisplay())
|
||||
return fmt.Sprintf("host %s does not offer a OpenTF provider registry", err.Hostname.ForDisplay())
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ type ErrProtocolNotSupported struct {
|
||||
|
||||
func (err ErrProtocolNotSupported) Error() string {
|
||||
return fmt.Sprintf(
|
||||
"provider %s %s is not supported by this version of terraform",
|
||||
"provider %s %s is not supported by this version of OpenTF",
|
||||
err.Provider,
|
||||
err.Version,
|
||||
)
|
||||
|
@ -200,7 +200,7 @@ func PackageMatchesHash(loc PackageLocation, want Hash) (bool, error) {
|
||||
}
|
||||
return got == want, nil
|
||||
default:
|
||||
return false, fmt.Errorf("unsupported hash format (this may require a newer version of Terraform)")
|
||||
return false, fmt.Errorf("unsupported hash format (this may require a newer version of OpenTF)")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ func (a packageHashAuthentication) AuthenticatePackage(localLocation PackageLoca
|
||||
// Indicates that none of the hashes given to
|
||||
// NewPackageHashAuthentication were considered to be usable by this
|
||||
// version of Terraform.
|
||||
return nil, fmt.Errorf("this version of Terraform does not support any of the checksum formats given for this provider")
|
||||
return nil, fmt.Errorf("this version of OpenTF does not support any of the checksum formats given for this provider")
|
||||
}
|
||||
|
||||
matches, err := PackageMatchesAnyHash(localLocation, a.RequiredHashes)
|
||||
|
@ -46,12 +46,12 @@ func TestSourceAvailableVersions(t *testing.T) {
|
||||
{
|
||||
"not.example.com/foo/bar",
|
||||
nil,
|
||||
`host not.example.com does not offer a Terraform provider registry`,
|
||||
`host not.example.com does not offer a OpenTF provider registry`,
|
||||
},
|
||||
{
|
||||
"too-new.example.com/foo/bar",
|
||||
nil,
|
||||
`host too-new.example.com does not support the provider registry protocol required by this Terraform version, but may be compatible with a different Terraform version`,
|
||||
`host too-new.example.com does not support the provider registry protocol required by this OpenTF version, but may be compatible with a different OpenTF version`,
|
||||
},
|
||||
{
|
||||
"fails.example.com/foo/bar",
|
||||
@ -173,7 +173,7 @@ func TestSourcePackageMeta(t *testing.T) {
|
||||
"linux", "amd64",
|
||||
PackageMeta{},
|
||||
nil,
|
||||
`host not.example.com does not offer a Terraform provider registry`,
|
||||
`host not.example.com does not offer a OpenTF provider registry`,
|
||||
},
|
||||
{
|
||||
"too-new.example.com/awesomesauce/happycloud",
|
||||
@ -181,7 +181,7 @@ func TestSourcePackageMeta(t *testing.T) {
|
||||
"linux", "amd64",
|
||||
PackageMeta{},
|
||||
nil,
|
||||
`host too-new.example.com does not support the provider registry protocol required by this Terraform version, but may be compatible with a different Terraform version`,
|
||||
`host too-new.example.com does not support the provider registry protocol required by this OpenTF version, but may be compatible with a different OpenTF version`,
|
||||
},
|
||||
{
|
||||
"fails.example.com/awesomesauce/happycloud",
|
||||
|
Loading…
Reference in New Issue
Block a user