Rename internal/getproviders from opentf to opentofu (#491)

This commit is contained in:
Elbaz 2023-09-20 16:03:22 +03:00 committed by GitHub
parent 059190f273
commit 0a12241c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 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 OpenTF version, but may be compatible with a different OpenTF version", err.Hostname.ForDisplay())
return fmt.Sprintf("host %s does not support the provider registry protocol required by this OpenTofu version, but may be compatible with a different OpenTofu version", err.Hostname.ForDisplay())
default:
return fmt.Sprintf("host %s does not offer a OpenTF provider registry", err.Hostname.ForDisplay())
return fmt.Sprintf("host %s does not offer a OpenTofu 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 OpenTF",
"provider %s %s is not supported by this version of OpenTofu",
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 OpenTF)")
return false, fmt.Errorf("unsupported hash format (this may require a newer version of OpenTofu)")
}
}

View File

@ -29,7 +29,7 @@ const (
)
const (
enforceGPGValidationEnvName = "OPENTF_ENFORCE_GPG_VALIDATION"
enforceGPGValidationEnvName = "OPENTOFU_ENFORCE_GPG_VALIDATION"
)
var (
@ -222,7 +222,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 OpenTF does not support any of the checksum formats given for this provider")
return nil, fmt.Errorf("this version of OpenTofu does not support any of the checksum formats given for this provider")
}
matches, err := PackageMatchesAnyHash(localLocation, a.RequiredHashes)
@ -412,7 +412,7 @@ func (s signatureAuthentication) AuthenticatePackage(location PackageLocation) (
if !shouldValidate {
// As this is a temporary measure, we will log a warning to the user making it very clear what is happening
// and why. This will be removed in a future release.
log.Printf("[WARN] Skipping GPG validation of provider package %s as no keys were provided by the registry. See https://github.com/opentffoundation/opentf/pull/309 for more information.", location)
log.Printf("[WARN] Skipping GPG validation of provider package %s as no keys were provided by the registry. See https://github.com/opentofu/opentofu/pull/309 for more information.", location)
// construct an empty keyID to indicate that we are not validating and return no errors
// this is to force a successful authentication

View File

@ -48,12 +48,12 @@ func TestSourceAvailableVersions(t *testing.T) {
{
"not.example.com/foo/bar",
nil,
`host not.example.com does not offer a OpenTF provider registry`,
`host not.example.com does not offer a OpenTofu provider registry`,
},
{
"too-new.example.com/foo/bar",
nil,
`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`,
`host too-new.example.com does not support the provider registry protocol required by this OpenTofu version, but may be compatible with a different OpenTofu version`,
},
{
"fails.example.com/foo/bar",
@ -176,7 +176,7 @@ func TestSourcePackageMeta(t *testing.T) {
"linux", "amd64",
PackageMeta{},
nil,
`host not.example.com does not offer a OpenTF provider registry`,
`host not.example.com does not offer a OpenTofu provider registry`,
},
{
"too-new.example.com/awesomesauce/happycloud",
@ -184,7 +184,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 OpenTF version, but may be compatible with a different OpenTF version`,
`host too-new.example.com does not support the provider registry protocol required by this OpenTofu version, but may be compatible with a different OpenTofu version`,
},
{
"fails.example.com/awesomesauce/happycloud",