File tree Expand file tree Collapse file tree 3 files changed +3
-26
lines changed
Expand file tree Collapse file tree 3 files changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const defaultMockServerImage = "mockserver/mockserver:5.15.0"
2525// Deprecated: Use Parrot instead
2626type MockServer struct {
2727 EnvComponent
28+ //nolint:staticcheck // Ignore SA1019: MockserverClient is deprecated
2829 Client * ctfClient.MockserverClient
2930 Endpoint string
3031 InternalEndpoint string
@@ -114,6 +115,7 @@ func (ms *MockServer) StartContainer() error {
114115 ms .Endpoint = endpoint
115116 ms .InternalEndpoint = fmt .Sprintf ("http://%s:%s" , ms .ContainerName , "1080" )
116117
118+ //nolint:staticcheck // Ignore SA1019: client.NewMockserverClient is deprecated
117119 client := ctfClient .NewMockserverClient (& ctfClient.MockserverConfig {
118120 LocalURL : endpoint ,
119121 ClusterURL : ms .InternalEndpoint ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ func TestMockServerSetStringValue(t *testing.T) {
2828 err = m .Client .SetStringValuePath (path , expected )
2929 require .NoError (t , err )
3030
31+ //nolint:staticcheck // Ignore SA1019: client.NewMockserverClient is deprecated
3132 url := fmt .Sprintf ("%s%s" , m .Client .LocalURL (), path )
3233 client := & http.Client {
3334 Timeout : 10 * time .Second ,
Original file line number Diff line number Diff line change @@ -68,32 +68,6 @@ func (p *Parrot) WithTestInstance(t *testing.T) *Parrot {
6868 return p
6969}
7070
71- // SetExternalAdapterMocks configures a specified number of mock external adapter endpoints.
72- // It generates unique paths for each adapter and stores their URLs for later use.
73- // This function is useful for testing scenarios that require multiple external adapter interactions.
74- func (p * Parrot ) SetExternalAdapterMocks (count int ) error {
75- // for i := 0; i < count; i++ {
76- // path := fmt.Sprintf("/ea-%d", i)
77- // err := ms.Client.SetRandomValuePath(path)
78- // if err != nil {
79- // return err
80- // }
81- // cName, err := ms.Container.Name(testcontext.Get(ms.t))
82- // if err != nil {
83- // return err
84- // }
85- // cName = strings.Replace(cName, "/", "", -1)
86- // eaUrl, err := url.Parse(fmt.Sprintf("http://%s:%s%s",
87- // cName, "1080", path))
88- // if err != nil {
89- // return err
90- // }
91- // ms.EAMockUrls = append(ms.EAMockUrls, eaUrl)
92- // }
93- // return nil
94- return fmt .Errorf ("not implemented" )
95- }
96-
9771// StartContainer initializes and starts a Parrot container.
9872// It sets up logging, retrieves the container request, and establishes endpoints for communication.
9973// This function is essential for testing environments that require a mock server instance.
You can’t perform that action at this time.
0 commit comments