Skip to content

Commit

Permalink
Formatting/test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhavlov committed Jan 18, 2018
1 parent 4e9735d commit 4962c8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions api/operator_autopilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ func (d *ReadableDuration) UnmarshalJSON(raw []byte) error {
// AutopilotGetConfiguration is used to query the current Autopilot configuration.
func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, error) {
r, err := op.c.newRequest("GET", "/v1/operator/autopilot/configuration")
if err != nil {
return nil, err
}
r.setQueryOptions(q)
_, resp, err := requireOK(op.c.doRequest(r))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions command/agent/operator_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/hashicorp/consul/testutil/retry"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/pascaldekloe/goe/verify"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -262,6 +261,7 @@ func TestOperator_ServerHealth_Unhealthy(t *testing.T) {
}

func TestDurationFixer(t *testing.T) {
assert := assert.New(t)
obj := map[string]interface{}{
"key1": []map[string]interface{}{
{
Expand Down Expand Up @@ -301,5 +301,5 @@ func TestDurationFixer(t *testing.T) {
}

// Ensure we only processed the intended fieldnames
verify.Values(t, "", obj, expected)
assert.Equal(obj, expected)
}
2 changes: 1 addition & 1 deletion nomad/state/autopilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func autopilotConfigTableSchema() *memdb.TableSchema {
return &memdb.TableSchema{
Name: "autopilot-config",
Indexes: map[string]*memdb.IndexSchema{
"id": &memdb.IndexSchema{
"id": {
Name: "id",
AllowMissing: true,
Unique: true,
Expand Down

0 comments on commit 4962c8b

Please sign in to comment.