Skip to content

Commit 15033d9

Browse files
committed
Properly deprecate
1 parent c357694 commit 15033d9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/docker/test_env/killgrave.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ type Killgrave struct {
4040
}
4141

4242
// Imposter define an imposter structure
43+
//
44+
// Deprecated: Use Parrot instead
4345
type KillgraveImposter struct {
4446
Request KillgraveRequest `json:"request"`
4547
Response KillgraveResponse `json:"response"`
4648
}
4749

50+
// Deprecated: Use Parrot instead
4851
type KillgraveRequest struct {
4952
Method string `json:"method"`
5053
Endpoint string `json:"endpoint,omitempty"`
@@ -83,6 +86,7 @@ type KillgraveAdapterResult struct {
8386
// NewKillgrave initializes a new Killgrave instance with specified networks and imposters directory.
8487
// It sets default configurations and allows for optional environment component modifications.
8588
// This function is useful for creating a Killgrave service for testing and simulating APIs.
89+
//
8690
// Deprecated: Use Parrot instead
8791
func NewKillgrave(networks []string, impostersDirectoryPath string, opts ...EnvComponentOption) *Killgrave {
8892
k := &Killgrave{
@@ -104,6 +108,8 @@ func NewKillgrave(networks []string, impostersDirectoryPath string, opts ...EnvC
104108

105109
// WithTestInstance sets up a Killgrave instance for testing by assigning a test logger and the testing context.
106110
// This allows for better logging during tests and facilitates easier debugging.
111+
//
112+
// Deprecated: Use Parrot instead
107113
func (k *Killgrave) WithTestInstance(t *testing.T) *Killgrave {
108114
k.l = logging.GetTestLogger(t)
109115
k.t = t
@@ -112,6 +118,8 @@ func (k *Killgrave) WithTestInstance(t *testing.T) *Killgrave {
112118

113119
// StartContainer initializes and starts the Killgrave container, setting up imposters and request dumping.
114120
// It also configures cleanup for the container and logs the external and internal endpoints for access.
121+
//
122+
// Deprecated: Use Parrot instead
115123
func (k *Killgrave) StartContainer() error {
116124
err := k.setupImposters()
117125
if err != nil {
@@ -322,6 +330,7 @@ func (k *Killgrave) SetAdapterBasedIntValuePath(path string, methods []string, v
322330
return k.SetAdapterBasedAnyValuePath(path, methods, v)
323331
}
324332

333+
// Deprecated: Use Parrot instead
325334
type RequestData struct {
326335
Method string `json:"method"`
327336
Host string `json:"host"`

lib/docker/test_env/mockserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type MockServer struct {
3636
// NewMockServer creates a new instance of MockServer with specified networks and options.
3737
// It initializes the server with a unique container name and a default startup timeout.
3838
// This function is useful for testing decentralized applications in a controlled environment.
39+
//
3940
// Deprecated: Use Parrot instead
4041
func NewMockServer(networks []string, opts ...EnvComponentOption) *MockServer {
4142
ms := &MockServer{
@@ -54,6 +55,8 @@ func NewMockServer(networks []string, opts ...EnvComponentOption) *MockServer {
5455

5556
// WithTestInstance configures the MockServer with a test logger and test context.
5657
// It returns the updated MockServer instance for use in testing scenarios.
58+
//
59+
// Deprecated: Use Parrot instead
5760
func (ms *MockServer) WithTestInstance(t *testing.T) *MockServer {
5861
ms.l = logging.GetTestLogger(t)
5962
ms.t = t

0 commit comments

Comments
 (0)