mirror of https://github.com/status-im/consul.git
Rename service-exports to partition-exports
Existing config entries prefixed by service- are specific to individual services. Since this config entry applies to partitions it is being renamed. Additionally, the Partition label was changed to Name because using Partition at the top-level and in the enterprise meta was leading to the enterprise meta partition being dropped by msgpack.
This commit is contained in:
parent
4ae2c8de9d
commit
5c24ed61a8
|
@ -360,7 +360,7 @@ func validateProposedConfigEntryInGraph(
|
||||||
}
|
}
|
||||||
case structs.ServiceIntentions:
|
case structs.ServiceIntentions:
|
||||||
case structs.MeshConfig:
|
case structs.MeshConfig:
|
||||||
case structs.ServiceExports:
|
case structs.PartitionExports:
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unhandled kind %q during validation of %q", kindName.Kind, kindName.Name)
|
return fmt.Errorf("unhandled kind %q during validation of %q", kindName.Kind, kindName.Name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,12 +177,12 @@ func TestUsageReporter_emitNodeUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -362,12 +362,12 @@ func TestUsageReporter_emitNodeUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -575,12 +575,12 @@ func TestUsageReporter_emitServiceUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -802,12 +802,12 @@ func TestUsageReporter_emitServiceUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1006,12 +1006,12 @@ func TestUsageReporter_emitKVUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1200,12 +1200,12 @@ func TestUsageReporter_emitKVUsage_OSS(t *testing.T) {
|
||||||
{Name: "kind", Value: "terminating-gateway"},
|
{Name: "kind", Value: "terminating-gateway"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=service-exports": {
|
"consul.usage.test.consul.state.config_entries;datacenter=dc1;kind=partition-exports": {
|
||||||
Name: "consul.usage.test.consul.state.config_entries",
|
Name: "consul.usage.test.consul.state.config_entries",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
Labels: []metrics.Label{
|
Labels: []metrics.Label{
|
||||||
{Name: "datacenter", Value: "dc1"},
|
{Name: "datacenter", Value: "dc1"},
|
||||||
{Name: "kind", Value: "service-exports"},
|
{Name: "kind", Value: "partition-exports"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,7 +27,7 @@ const (
|
||||||
TerminatingGateway string = "terminating-gateway"
|
TerminatingGateway string = "terminating-gateway"
|
||||||
ServiceIntentions string = "service-intentions"
|
ServiceIntentions string = "service-intentions"
|
||||||
MeshConfig string = "mesh"
|
MeshConfig string = "mesh"
|
||||||
ServiceExports string = "service-exports"
|
PartitionExports string = "partition-exports"
|
||||||
|
|
||||||
ProxyConfigGlobal string = "global"
|
ProxyConfigGlobal string = "global"
|
||||||
MeshConfigMesh string = "mesh"
|
MeshConfigMesh string = "mesh"
|
||||||
|
@ -45,7 +45,7 @@ var AllConfigEntryKinds = []string{
|
||||||
TerminatingGateway,
|
TerminatingGateway,
|
||||||
ServiceIntentions,
|
ServiceIntentions,
|
||||||
MeshConfig,
|
MeshConfig,
|
||||||
ServiceExports,
|
PartitionExports,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigEntry is the interface for centralized configuration stored in Raft.
|
// ConfigEntry is the interface for centralized configuration stored in Raft.
|
||||||
|
@ -532,8 +532,8 @@ func MakeConfigEntry(kind, name string) (ConfigEntry, error) {
|
||||||
return &ServiceIntentionsConfigEntry{Name: name}, nil
|
return &ServiceIntentionsConfigEntry{Name: name}, nil
|
||||||
case MeshConfig:
|
case MeshConfig:
|
||||||
return &MeshConfigEntry{}, nil
|
return &MeshConfigEntry{}, nil
|
||||||
case ServiceExports:
|
case PartitionExports:
|
||||||
return &ServiceExportsConfigEntry{Partition: name}, nil
|
return &PartitionExportsConfigEntry{Name: name}, nil
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid config entry kind: %s", kind)
|
return nil, fmt.Errorf("invalid config entry kind: %s", kind)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"github.com/hashicorp/consul/acl"
|
"github.com/hashicorp/consul/acl"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServiceExportsConfigEntry is the top-level struct for exporting a service to be exposed
|
// PartitionExportsConfigEntry is the top-level struct for exporting a service to be exposed
|
||||||
// across other admin partitions.
|
// across other admin partitions.
|
||||||
type ServiceExportsConfigEntry struct {
|
type PartitionExportsConfigEntry struct {
|
||||||
Partition string
|
Name string
|
||||||
|
|
||||||
// Services is a list of services to be exported and the list of partitions
|
// Services is a list of services to be exported and the list of partitions
|
||||||
// to expose them to.
|
// to expose them to.
|
||||||
|
@ -39,7 +39,7 @@ type ServiceConsumer struct {
|
||||||
Partition string
|
Partition string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) Clone() *ServiceExportsConfigEntry {
|
func (e *PartitionExportsConfigEntry) Clone() *PartitionExportsConfigEntry {
|
||||||
e2 := *e
|
e2 := *e
|
||||||
e2.Services = make([]ExportedService, len(e.Services))
|
e2.Services = make([]ExportedService, len(e.Services))
|
||||||
for _, svc := range e.Services {
|
for _, svc := range e.Services {
|
||||||
|
@ -54,32 +54,30 @@ func (e *ServiceExportsConfigEntry) Clone() *ServiceExportsConfigEntry {
|
||||||
return &e2
|
return &e2
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetKind() string {
|
func (e *PartitionExportsConfigEntry) GetKind() string {
|
||||||
return ServiceExports
|
return PartitionExports
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetName() string {
|
func (e *PartitionExportsConfigEntry) GetName() string {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.Partition
|
return e.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetMeta() map[string]string {
|
func (e *PartitionExportsConfigEntry) GetMeta() map[string]string {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return e.Meta
|
return e.Meta
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) Normalize() error {
|
func (e *PartitionExportsConfigEntry) Normalize() error {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return fmt.Errorf("config entry is nil")
|
return fmt.Errorf("config entry is nil")
|
||||||
}
|
}
|
||||||
|
e.EnterpriseMeta = *DefaultEnterpriseMetaInPartition(e.Name)
|
||||||
meta := DefaultEnterpriseMetaInPartition(e.Partition)
|
|
||||||
e.EnterpriseMeta.Merge(meta)
|
|
||||||
e.EnterpriseMeta.Normalize()
|
e.EnterpriseMeta.Normalize()
|
||||||
|
|
||||||
for i := range e.Services {
|
for i := range e.Services {
|
||||||
|
@ -89,12 +87,12 @@ func (e *ServiceExportsConfigEntry) Normalize() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) Validate() error {
|
func (e *PartitionExportsConfigEntry) Validate() error {
|
||||||
if e.Partition == "" {
|
if e.Name == "" {
|
||||||
return fmt.Errorf("Partition is required")
|
return fmt.Errorf("Name is required")
|
||||||
}
|
}
|
||||||
if e.Partition == WildcardSpecifier {
|
if e.Name == WildcardSpecifier {
|
||||||
return fmt.Errorf("service-exports Partition must be the name of a partition, and not a wildcard")
|
return fmt.Errorf("partition-exports Name must be the name of a partition, and not a wildcard")
|
||||||
}
|
}
|
||||||
|
|
||||||
validationErr := validateConfigEntryMeta(e.Meta)
|
validationErr := validateConfigEntryMeta(e.Meta)
|
||||||
|
@ -116,19 +114,19 @@ func (e *ServiceExportsConfigEntry) Validate() error {
|
||||||
return validationErr
|
return validationErr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) CanRead(authz acl.Authorizer) bool {
|
func (e *PartitionExportsConfigEntry) CanRead(authz acl.Authorizer) bool {
|
||||||
var authzContext acl.AuthorizerContext
|
var authzContext acl.AuthorizerContext
|
||||||
e.FillAuthzContext(&authzContext)
|
e.FillAuthzContext(&authzContext)
|
||||||
return authz.MeshRead(&authzContext) == acl.Allow
|
return authz.MeshRead(&authzContext) == acl.Allow
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) CanWrite(authz acl.Authorizer) bool {
|
func (e *PartitionExportsConfigEntry) CanWrite(authz acl.Authorizer) bool {
|
||||||
var authzContext acl.AuthorizerContext
|
var authzContext acl.AuthorizerContext
|
||||||
e.FillAuthzContext(&authzContext)
|
e.FillAuthzContext(&authzContext)
|
||||||
return authz.MeshWrite(&authzContext) == acl.Allow
|
return authz.MeshWrite(&authzContext) == acl.Allow
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetRaftIndex() *RaftIndex {
|
func (e *PartitionExportsConfigEntry) GetRaftIndex() *RaftIndex {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return &RaftIndex{}
|
return &RaftIndex{}
|
||||||
}
|
}
|
||||||
|
@ -136,7 +134,7 @@ func (e *ServiceExportsConfigEntry) GetRaftIndex() *RaftIndex {
|
||||||
return &e.RaftIndex
|
return &e.RaftIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetEnterpriseMeta() *EnterpriseMeta {
|
func (e *PartitionExportsConfigEntry) GetEnterpriseMeta() *EnterpriseMeta {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1665,9 +1665,9 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "service-exports",
|
name: "partition-exports",
|
||||||
snake: `
|
snake: `
|
||||||
kind = "service-exports"
|
kind = "partition-exports"
|
||||||
partition = "foo"
|
partition = "foo"
|
||||||
meta {
|
meta {
|
||||||
"foo" = "bar"
|
"foo" = "bar"
|
||||||
|
@ -1698,7 +1698,7 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
]
|
]
|
||||||
`,
|
`,
|
||||||
camel: `
|
camel: `
|
||||||
Kind = "service-exports"
|
Kind = "partition-exports"
|
||||||
Partition = "foo"
|
Partition = "foo"
|
||||||
Meta {
|
Meta {
|
||||||
"foo" = "bar"
|
"foo" = "bar"
|
||||||
|
@ -1728,8 +1728,7 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
`,
|
`,
|
||||||
expect: &ServiceExportsConfigEntry{
|
expect: &PartitionExportsConfigEntry{
|
||||||
Partition: "foo",
|
|
||||||
Meta: map[string]string{
|
Meta: map[string]string{
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"gir": "zim",
|
"gir": "zim",
|
||||||
|
|
|
@ -22,7 +22,7 @@ const (
|
||||||
TerminatingGateway string = "terminating-gateway"
|
TerminatingGateway string = "terminating-gateway"
|
||||||
ServiceIntentions string = "service-intentions"
|
ServiceIntentions string = "service-intentions"
|
||||||
MeshConfig string = "mesh"
|
MeshConfig string = "mesh"
|
||||||
ServiceExports string = "service-exports"
|
PartitionExports string = "partition-exports"
|
||||||
|
|
||||||
ProxyConfigGlobal string = "global"
|
ProxyConfigGlobal string = "global"
|
||||||
MeshConfigMesh string = "mesh"
|
MeshConfigMesh string = "mesh"
|
||||||
|
@ -277,8 +277,8 @@ func makeConfigEntry(kind, name string) (ConfigEntry, error) {
|
||||||
return &ServiceIntentionsConfigEntry{Kind: kind, Name: name}, nil
|
return &ServiceIntentionsConfigEntry{Kind: kind, Name: name}, nil
|
||||||
case MeshConfig:
|
case MeshConfig:
|
||||||
return &MeshConfigEntry{}, nil
|
return &MeshConfigEntry{}, nil
|
||||||
case ServiceExports:
|
case PartitionExports:
|
||||||
return &ServiceExportsConfigEntry{Partition: name}, nil
|
return &PartitionExportsConfigEntry{Name: name}, nil
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid config entry kind: %s", kind)
|
return nil, fmt.Errorf("invalid config entry kind: %s", kind)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,15 @@ package api
|
||||||
|
|
||||||
import "encoding/json"
|
import "encoding/json"
|
||||||
|
|
||||||
// ServiceExportsConfigEntry manages the exported services for a single admin partition.
|
// PartitionExportsConfigEntry manages the exported services for a single admin partition.
|
||||||
// Admin Partitions are a Consul Enterprise feature.
|
// Admin Partitions are a Consul Enterprise feature.
|
||||||
type ServiceExportsConfigEntry struct {
|
type PartitionExportsConfigEntry struct {
|
||||||
// Partition is the partition the ServiceExportsConfigEntry applies to.
|
// Name is the name of the partition the PartitionExportsConfigEntry applies to.
|
||||||
|
// Partitioning is a Consul Enterprise feature.
|
||||||
|
Name string `json:",omitempty"`
|
||||||
|
|
||||||
|
// Partition is the partition where the PartitionExportsConfigEntry is stored.
|
||||||
|
// If the partition does not match the name, the name will overwrite the partition.
|
||||||
// Partitioning is a Consul Enterprise feature.
|
// Partitioning is a Consul Enterprise feature.
|
||||||
Partition string `json:",omitempty"`
|
Partition string `json:",omitempty"`
|
||||||
|
|
||||||
|
@ -44,23 +49,23 @@ type ServiceConsumer struct {
|
||||||
Partition string
|
Partition string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ServiceExportsConfigEntry) GetKind() string { return ServiceExports }
|
func (e *PartitionExportsConfigEntry) GetKind() string { return PartitionExports }
|
||||||
func (e *ServiceExportsConfigEntry) GetName() string { return e.Partition }
|
func (e *PartitionExportsConfigEntry) GetName() string { return e.Name }
|
||||||
func (e *ServiceExportsConfigEntry) GetPartition() string { return e.Partition }
|
func (e *PartitionExportsConfigEntry) GetPartition() string { return e.Name }
|
||||||
func (e *ServiceExportsConfigEntry) GetNamespace() string { return IntentionDefaultNamespace }
|
func (e *PartitionExportsConfigEntry) GetNamespace() string { return IntentionDefaultNamespace }
|
||||||
func (e *ServiceExportsConfigEntry) GetMeta() map[string]string { return e.Meta }
|
func (e *PartitionExportsConfigEntry) GetMeta() map[string]string { return e.Meta }
|
||||||
func (e *ServiceExportsConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex }
|
func (e *PartitionExportsConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex }
|
||||||
func (e *ServiceExportsConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex }
|
func (e *PartitionExportsConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex }
|
||||||
|
|
||||||
// MarshalJSON adds the Kind field so that the JSON can be decoded back into the
|
// MarshalJSON adds the Kind field so that the JSON can be decoded back into the
|
||||||
// correct type.
|
// correct type.
|
||||||
func (e *ServiceExportsConfigEntry) MarshalJSON() ([]byte, error) {
|
func (e *PartitionExportsConfigEntry) MarshalJSON() ([]byte, error) {
|
||||||
type Alias ServiceExportsConfigEntry
|
type Alias PartitionExportsConfigEntry
|
||||||
source := &struct {
|
source := &struct {
|
||||||
Kind string
|
Kind string
|
||||||
*Alias
|
*Alias
|
||||||
}{
|
}{
|
||||||
Kind: ServiceExports,
|
Kind: PartitionExports,
|
||||||
Alias: (*Alias)(e),
|
Alias: (*Alias)(e),
|
||||||
}
|
}
|
||||||
return json.Marshal(source)
|
return json.Marshal(source)
|
||||||
|
|
|
@ -2722,10 +2722,10 @@ func TestParseConfigEntry(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "service-exports",
|
name: "partition-exports",
|
||||||
snake: `
|
snake: `
|
||||||
kind = "service-exports"
|
kind = "partition-exports"
|
||||||
partition = "foo"
|
name = "foo"
|
||||||
meta {
|
meta {
|
||||||
"foo" = "bar"
|
"foo" = "bar"
|
||||||
"gir" = "zim"
|
"gir" = "zim"
|
||||||
|
@ -2755,8 +2755,8 @@ func TestParseConfigEntry(t *testing.T) {
|
||||||
]
|
]
|
||||||
`,
|
`,
|
||||||
camel: `
|
camel: `
|
||||||
Kind = "service-exports"
|
Kind = "partition-exports"
|
||||||
Partition = "foo"
|
Name = "foo"
|
||||||
Meta {
|
Meta {
|
||||||
"foo" = "bar"
|
"foo" = "bar"
|
||||||
"gir" = "zim"
|
"gir" = "zim"
|
||||||
|
@ -2787,8 +2787,8 @@ func TestParseConfigEntry(t *testing.T) {
|
||||||
`,
|
`,
|
||||||
snakeJSON: `
|
snakeJSON: `
|
||||||
{
|
{
|
||||||
"kind": "service-exports",
|
"kind": "partition-exports",
|
||||||
"partition": "foo",
|
"name": "foo",
|
||||||
"meta": {
|
"meta": {
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"gir": "zim"
|
"gir": "zim"
|
||||||
|
@ -2820,8 +2820,8 @@ func TestParseConfigEntry(t *testing.T) {
|
||||||
`,
|
`,
|
||||||
camelJSON: `
|
camelJSON: `
|
||||||
{
|
{
|
||||||
"Kind": "service-exports",
|
"Kind": "partition-exports",
|
||||||
"Partition": "foo",
|
"Name": "foo",
|
||||||
"Meta": {
|
"Meta": {
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"gir": "zim"
|
"gir": "zim"
|
||||||
|
@ -2851,8 +2851,8 @@ func TestParseConfigEntry(t *testing.T) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
expect: &api.ServiceExportsConfigEntry{
|
expect: &api.PartitionExportsConfigEntry{
|
||||||
Partition: "foo",
|
Name: "foo",
|
||||||
Meta: map[string]string{
|
Meta: map[string]string{
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"gir": "zim",
|
"gir": "zim",
|
||||||
|
|
Loading…
Reference in New Issue