mirror of https://github.com/status-im/consul.git
structs: add two cache completeness tests types that implement cache.Request
This commit is contained in:
parent
46dfdb611f
commit
920ae31598
|
@ -5,9 +5,10 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/consul/acl"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hashicorp/consul/acl"
|
||||
)
|
||||
|
||||
func TestIntention_ACLs(t *testing.T) {
|
||||
|
@ -453,3 +454,9 @@ func TestIntention_String(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestIntentionQueryRequest_CacheInfoKey(t *testing.T) {
|
||||
// TODO: should these fields be included in the key?
|
||||
ignored := []string{"IntentionID", "Check", "Exact", "QueryOptions"}
|
||||
assertCacheInfoKeyIsComplete(t, &IntentionQueryRequest{}, ignored...)
|
||||
}
|
||||
|
|
|
@ -27,3 +27,9 @@ func TestStructs_PreparedQuery_GetACLPrefix(t *testing.T) {
|
|||
t.Fatalf("bad: ok=%v prefix=%#v", ok, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPreparedQueryExecuteRequest_CacheInfoKey(t *testing.T) {
|
||||
// TODO: should these fields be included in the key?
|
||||
ignored := []string{"Agent", "QueryOptions"}
|
||||
assertCacheInfoKeyIsComplete(t, &PreparedQueryExecuteRequest{}, ignored...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue