mirror of
https://github.com/status-im/consul.git
synced 2025-02-03 09:24:25 +00:00
agent/consul/state: need to set Meta for intentions for tests
This commit is contained in:
parent
ad42f42a17
commit
97e2a73145
@ -33,6 +33,7 @@ func TestStore_IntentionSetGet_basic(t *testing.T) {
|
|||||||
// Build a valid intention
|
// Build a valid intention
|
||||||
ixn := &structs.Intention{
|
ixn := &structs.Intention{
|
||||||
ID: testUUID(),
|
ID: testUUID(),
|
||||||
|
Meta: map[string]string{},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inserting a with empty ID is disallowed.
|
// Inserting a with empty ID is disallowed.
|
||||||
@ -51,6 +52,7 @@ func TestStore_IntentionSetGet_basic(t *testing.T) {
|
|||||||
// Read it back out and verify it.
|
// Read it back out and verify it.
|
||||||
expected := &structs.Intention{
|
expected := &structs.Intention{
|
||||||
ID: ixn.ID,
|
ID: ixn.ID,
|
||||||
|
Meta: map[string]string{},
|
||||||
RaftIndex: structs.RaftIndex{
|
RaftIndex: structs.RaftIndex{
|
||||||
CreateIndex: 1,
|
CreateIndex: 1,
|
||||||
ModifyIndex: 1,
|
ModifyIndex: 1,
|
||||||
@ -265,9 +267,11 @@ func TestStore_IntentionsList(t *testing.T) {
|
|||||||
ixns := structs.Intentions{
|
ixns := structs.Intentions{
|
||||||
&structs.Intention{
|
&structs.Intention{
|
||||||
ID: testUUID(),
|
ID: testUUID(),
|
||||||
|
Meta: map[string]string{},
|
||||||
},
|
},
|
||||||
&structs.Intention{
|
&structs.Intention{
|
||||||
ID: testUUID(),
|
ID: testUUID(),
|
||||||
|
Meta: map[string]string{},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,6 +293,7 @@ func TestStore_IntentionsList(t *testing.T) {
|
|||||||
expected := structs.Intentions{
|
expected := structs.Intentions{
|
||||||
&structs.Intention{
|
&structs.Intention{
|
||||||
ID: ixns[0].ID,
|
ID: ixns[0].ID,
|
||||||
|
Meta: map[string]string{},
|
||||||
RaftIndex: structs.RaftIndex{
|
RaftIndex: structs.RaftIndex{
|
||||||
CreateIndex: 1,
|
CreateIndex: 1,
|
||||||
ModifyIndex: 1,
|
ModifyIndex: 1,
|
||||||
@ -296,6 +301,7 @@ func TestStore_IntentionsList(t *testing.T) {
|
|||||||
},
|
},
|
||||||
&structs.Intention{
|
&structs.Intention{
|
||||||
ID: ixns[1].ID,
|
ID: ixns[1].ID,
|
||||||
|
Meta: map[string]string{},
|
||||||
RaftIndex: structs.RaftIndex{
|
RaftIndex: structs.RaftIndex{
|
||||||
CreateIndex: 2,
|
CreateIndex: 2,
|
||||||
ModifyIndex: 2,
|
ModifyIndex: 2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user