Fix contraint store/read from KV

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-11-09 19:27:04 +01:00
parent 00c7e5c72b
commit c9cc3c9895
No known key found for this signature in database
GPG key ID: D808B4C167352E59
19 changed files with 58 additions and 41 deletions

View file

@ -230,13 +230,13 @@ func TestNilClientTLS(t *testing.T) {
func TestMatchingConstraints(t *testing.T) {
cases := []struct {
constraints []types.Constraint
constraints types.Constraints
tags []string
expected bool
}{
// simple test: must match
{
constraints: []types.Constraint{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: true,
@ -250,7 +250,7 @@ func TestMatchingConstraints(t *testing.T) {
},
// simple test: must match but does not match
{
constraints: []types.Constraint{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: true,
@ -264,7 +264,7 @@ func TestMatchingConstraints(t *testing.T) {
},
// simple test: must not match
{
constraints: []types.Constraint{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: false,
@ -278,7 +278,7 @@ func TestMatchingConstraints(t *testing.T) {
},
// complex test: globbing
{
constraints: []types.Constraint{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: true,
@ -292,7 +292,7 @@ func TestMatchingConstraints(t *testing.T) {
},
// complex test: multiple constraints
{
constraints: []types.Constraint{
constraints: types.Constraints{
{
Key: "tag",
MustMatch: true,