Skip to content

Commit

Permalink
Fix linting issues and re-generate docs
Browse files Browse the repository at this point in the history
Fix typos, newlines and unused return.
Fix docs not regenerated when going from nested list attribute to nested
set attribute.
  • Loading branch information
gboutry committed Feb 29, 2024
1 parent 1b01c51 commit 392610d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/resources/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "juju_application" "placement_example" {
- `charm` (Block List) The name of the charm to be installed from Charmhub. (see [below for nested schema](#nestedblock--charm))
- `config` (Map of String) Application specific configuration. Must evaluate to a string, integer or boolean.
- `constraints` (String) Constraints imposed on this application.
- `endpoint_bindings` (Attributes List) Configure endpoint bindings (see [below for nested schema](#nestedatt--endpoint_bindings))
- `endpoint_bindings` (Attributes Set) Configure endpoint bindings (see [below for nested schema](#nestedatt--endpoint_bindings))
- `expose` (Block List) Makes an application publicly available over the network (see [below for nested schema](#nestedblock--expose))
- `name` (String) A custom name for the application deployment. If empty, uses the charm's name.
- `placement` (String) Specify the target location for the application's units
Expand Down
1 change: 0 additions & 1 deletion internal/juju/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,6 @@ func computeUpdatedBindings(currentBindings map[string]string, inputBindings map
}
endpointBindings[k] = newSpace
} else {

if currentSpace == oldDefault {
endpointBindings[k] = defaultSpace
} else {
Expand Down
3 changes: 1 addition & 2 deletions internal/provider/resource_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ func setupModelAndSpaces(t *testing.T, modelName string) (string, string, func()
t.Fatal(err)
}
cleanUp := func() {
TestClient.Models.DestroyModel(internaljuju.DestroyModelInput{UUID: model.UUID})
_ = TestClient.Models.DestroyModel(internaljuju.DestroyModelInput{UUID: model.UUID})
_ = conn.Close()
}

Expand Down Expand Up @@ -672,7 +672,6 @@ func testAccResourceApplicationEndpointBindings(modelName, appName, constraints
"space" = %q,
},
`, endpoint, space)

}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/validator_set_unique_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (v setNestedIsAttributeUniqueValidator) Description(ctx context.Context) st

// MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (v setNestedIsAttributeUniqueValidator) MarkdownDescription(context.Context) string {
return fmt.Sprintf("Ensure following attributes have unique values accross the set: %q", v.PathExpressions.String())
return fmt.Sprintf("Ensure following attributes have unique values across the set: %q", v.PathExpressions.String())
}

// Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.
Expand Down

0 comments on commit 392610d

Please sign in to comment.