Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
annawinkler committed Apr 26, 2022
1 parent 7b8f74b commit eae0b49
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,20 +763,23 @@ func createPrivateRegistryProvider(t *testing.T, client *Client, org *Organizati
Namespace: org.Name,
RegistryName: PrivateRegistry,
}

prv, err := client.RegistryProviders.Create(ctx, org.Name, options)

if err != nil {
t.Fatal(err)
}

prv.Organization = org

return prv, func() {
id := RegistryProviderID{
id := RegistryProviderID {
OrganizationName: org.Name,
RegistryName: prv.RegistryName,
Namespace: prv.Namespace,
Name: prv.Name,
}

if err := client.RegistryProviders.Delete(ctx, id); err != nil {
t.Errorf("Error destroying registry provider! WARNING: Dangling resources\n"+
"may exist! The full error is shown below.\n\n"+
Expand All @@ -803,20 +806,23 @@ func createPublicRegistryProvider(t *testing.T, client *Client, org *Organizatio
Namespace: "tst-namespace-" + randomString(t),
RegistryName: PublicRegistry,
}

prv, err := client.RegistryProviders.Create(ctx, org.Name, options)

if err != nil {
t.Fatal(err)
}

prv.Organization = org

return prv, func() {
id := RegistryProviderID{
id := RegistryProviderID {
OrganizationName: org.Name,
RegistryName: prv.RegistryName,
Namespace: prv.Namespace,
Name: prv.Name,
}

if err := client.RegistryProviders.Delete(ctx, id); err != nil {
t.Errorf("Error destroying registry provider! WARNING: Dangling resources\n"+
"may exist! The full error is shown below.\n\n"+
Expand All @@ -836,7 +842,7 @@ func createRegistryProviderVersion(t *testing.T, client *Client, provider *Regis
provider, providerCleanup = createPrivateRegistryProvider(t, client, nil)
}

providerId := RegistryProviderID{
providerID := RegistryProviderID {
OrganizationName: provider.Organization.Name,
RegistryName: provider.RegistryName,
Namespace: provider.Namespace,
Expand All @@ -849,18 +855,21 @@ func createRegistryProviderVersion(t *testing.T, client *Client, provider *Regis
Version: randomSemver(t),
KeyID: randomString(t),
}
prvv, err := client.RegistryProviderVersions.Create(ctx, providerId, options)

prvv, err := client.RegistryProviderVersions.Create(ctx, providerID, options)

if err != nil {
t.Fatal(err)
}

prvv.RegistryProvider = provider

return prvv, func() {
id := RegistryProviderVersionID{
id := RegistryProviderVersionID {
Version: options.Version,
RegistryProviderID: providerId,
RegistryProviderID: providerID,
}

if err := client.RegistryProviderVersions.Delete(ctx, id); err != nil {
t.Errorf("Error destroying registry provider version! WARNING: Dangling resources\n"+
"may exist! The full error is shown below.\n\n"+
Expand Down
2 changes: 1 addition & 1 deletion registry_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Compile-time proof of interface implementation.
var _ RegistryProviders = (*registryProviders)(nil)

// RegistryProviders describes all the registry provider related methods that the Terraform
// RegistryProviders describes all the registry provider-related methods that the Terraform
// Enterprise API supports.
//
// TFE API docs: https://www.terraform.io/docs/cloud/api/providers.html
Expand Down
2 changes: 1 addition & 1 deletion registry_provider_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Compile-time proof of interface implementation.
var _ RegistryProviderVersions = (*registryProviderVersions)(nil)

// RegistryProviders describes all the registry provider related methods that the Terraform
// RegistryProviderVersions describes all the registry provider related methods that the Terraform
// Enterprise API supports.
//
// TFE API docs: https://www.terraform.io/docs/cloud/api/providers.html
Expand Down

0 comments on commit eae0b49

Please sign in to comment.