mirror of
https://github.com/status-im/consul.git
synced 2025-01-21 02:59:48 +00:00
5d294b26d3
* Exported services api implemented * Tests added, refactored code * Adding server tests * changelog added * Proto gen added * Adding codegen changes * changing url, response object * Fixing lint error by having namespace and partition directly * Tests changes * refactoring tests * Simplified uniqueness logic for exported services, sorted the response in order of service name * Fix lint errors, refactored code
28 lines
547 B
Go
28 lines
547 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package testutils
|
|
|
|
import "google.golang.org/grpc/metadata"
|
|
|
|
type MockServerTransportStream struct {
|
|
MD metadata.MD
|
|
}
|
|
|
|
func (m *MockServerTransportStream) Method() string {
|
|
return ""
|
|
}
|
|
|
|
func (m *MockServerTransportStream) SetHeader(md metadata.MD) error {
|
|
return nil
|
|
}
|
|
|
|
func (m *MockServerTransportStream) SendHeader(md metadata.MD) error {
|
|
m.MD = metadata.Join(m.MD, md)
|
|
return nil
|
|
}
|
|
|
|
func (m *MockServerTransportStream) SetTrailer(md metadata.MD) error {
|
|
return nil
|
|
}
|