Skip to content

Commit

Permalink
traffic-permissions: fix unit tests to account for mutation hook (#3004)
Browse files Browse the repository at this point in the history
Consul now will default tenancy for traffic permission sources. This PR changes unit tests to account for that
  • Loading branch information
ishustava authored Sep 23, 2023
1 parent e57edf5 commit db6c3de
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,14 @@ func TestMeshConfigController_createsMeshConfig(t *testing.T) {
Sources: []*pbauth.Source{
{
IdentityName: "source-identity",
Namespace: common.DefaultConsulNamespace,
Partition: common.DefaultConsulPartition,
Peer: constants.DefaultConsulPeer,
},
{
Namespace: "the space namespace space",
Partition: common.DefaultConsulPartition,
Peer: constants.DefaultConsulPeer,
},
},
DestinationRules: []*pbauth.DestinationRule{
Expand Down Expand Up @@ -228,6 +233,8 @@ func TestMeshConfigController_updatesMeshConfig(t *testing.T) {
Sources: []*pbauth.Source{
{
Namespace: "the space namespace space",
Partition: common.DefaultConsulPartition,
Peer: constants.DefaultConsulPeer,
},
},
DestinationRules: []*pbauth.DestinationRule{
Expand Down Expand Up @@ -604,6 +611,9 @@ func TestMeshConfigController_doesNotCreateUnownedMeshConfig(t *testing.T) {
Sources: v2beta1.Sources{
{
IdentityName: "source-identity",
Namespace: common.DefaultConsulNamespace,
Partition: common.DefaultConsulPartition,
Peer: constants.DefaultConsulPeer,
},
},
},
Expand Down Expand Up @@ -704,6 +714,9 @@ func TestMeshConfigController_doesNotDeleteUnownedConfig(t *testing.T) {
Sources: v2beta1.Sources{
{
IdentityName: "source-identity",
Namespace: common.DefaultConsulNamespace,
Partition: common.DefaultConsulPartition,
Peer: constants.DefaultConsulPeer,
},
},
},
Expand Down

0 comments on commit db6c3de

Please sign in to comment.