mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 15:47:21 +00:00
Fix the TestAPI_CatalogRegistration test
This commit is contained in:
parent
9ff69194a2
commit
2343413bf0
@ -322,6 +322,23 @@ func (r *DeregisterRequest) RequestDatacenter() string {
|
|||||||
return r.Datacenter
|
return r.Datacenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func (r *DeregisterRequest) UnmarshalJSON(data []byte) error {
|
||||||
|
type Alias DeregisterRequest
|
||||||
|
aux := &struct {
|
||||||
|
Address string // obsolete field - but we want to explicitly allow it
|
||||||
|
*Alias
|
||||||
|
}{
|
||||||
|
Alias: (*Alias)(r),
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := lib.UnmarshalJSON(data, &aux); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// QuerySource is used to pass along information about the source node
|
// QuerySource is used to pass along information about the source node
|
||||||
// in queries so that we can adjust the response based on its network
|
// in queries so that we can adjust the response based on its network
|
||||||
// coordinates.
|
// coordinates.
|
||||||
|
@ -68,7 +68,7 @@ type CatalogRegistration struct {
|
|||||||
|
|
||||||
type CatalogDeregistration struct {
|
type CatalogDeregistration struct {
|
||||||
Node string
|
Node string
|
||||||
Address string // Obsolete.
|
Address string `json:",omitempty"` // Obsolete.
|
||||||
Datacenter string
|
Datacenter string
|
||||||
ServiceID string
|
ServiceID string
|
||||||
CheckID string
|
CheckID string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user