Skip to content

Commit

Permalink
simple test to ensure that scaling endpoint methods support IsRead for
Browse files Browse the repository at this point in the history
stale read support
  • Loading branch information
cgbaker authored and backspace committed Jan 22, 2021
1 parent bc450c9 commit 1c5e0c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nomad/scaling_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/hashicorp/nomad/acl"
Expand All @@ -14,6 +15,14 @@ import (
"github.com/hashicorp/nomad/testutil"
)

func TestScalingEndpoint_StaleReadSupport(t *testing.T) {
assert := assert.New(t)
list := &structs.ScalingPolicyListRequest{}
assert.True(list.IsRead())
get := &structs.ScalingPolicySpecificRequest{}
assert.True(get.IsRead())
}

func TestScalingEndpoint_GetPolicy(t *testing.T) {
t.Parallel()
require := require.New(t)
Expand Down

0 comments on commit 1c5e0c5

Please sign in to comment.