Merge pull request #93 from opentffoundation/update-get-providers

This commit is contained in:
Elbaz 2023-08-23 13:04:45 +03:00 committed by GitHub
commit 508c4613f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -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,
)

View File

@ -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)")
}
}

View File

@ -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)

View File

@ -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",