-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add tests to ExecuteWithClient for pipelines cmds (#2111)
* refactor: no need to set a default table style This line is redundant. * add tests for list pipeline * fix imports * rename test file * empty response test * test pipelines describe * move services to single file * rather do this instead * create testutils and reorganize internal * update pipelines ls test * update * add test for connectors ls * refactor connector list test * test connectors describe * test processor describe * test processorplugins describe * test connectorplugins describe * compare with entire table * refactor tests to compare with entire table * test processors ls * test procesor plugins ls * test connectorplugins ls * remove unneeded call no need https://github.com/uber-go/mock/blob/v0.5.0/gomock/controller.go#L80-L104 * better test * separate concerns
- Loading branch information
Showing
32 changed files
with
1,802 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright © 2025 Meroxa, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package api | ||
|
||
import ( | ||
"context" | ||
|
||
apiv1 "github.com/conduitio/conduit/proto/api/v1" | ||
"google.golang.org/grpc" | ||
) | ||
|
||
//go:generate mockgen -destination=mock/connector_service.go -package=mock . ConnectorService | ||
|
||
// ConnectorService defines the methods of the ConnectorServiceClient that are currently used by the CLI. | ||
type ConnectorService interface { | ||
ListConnectors(ctx context.Context, in *apiv1.ListConnectorsRequest, opts ...grpc.CallOption) (*apiv1.ListConnectorsResponse, error) | ||
GetConnector(ctx context.Context, in *apiv1.GetConnectorRequest, opts ...grpc.CallOption) (*apiv1.GetConnectorResponse, error) | ||
ListConnectorPlugins(ctx context.Context, in *apiv1.ListConnectorPluginsRequest, opts ...grpc.CallOption) (*apiv1.ListConnectorPluginsResponse, error) | ||
} | ||
|
||
//go:generate mockgen -destination=mock/pipeline_service.go -package=mock . PipelineService | ||
|
||
// PipelineService defines the methods of the PipelineServiceClient that are currently used by the CLI. | ||
type PipelineService interface { | ||
ListPipelines(ctx context.Context, in *apiv1.ListPipelinesRequest, opts ...grpc.CallOption) (*apiv1.ListPipelinesResponse, error) | ||
GetPipeline(ctx context.Context, in *apiv1.GetPipelineRequest, opts ...grpc.CallOption) (*apiv1.GetPipelineResponse, error) | ||
GetDLQ(ctx context.Context, in *apiv1.GetDLQRequest, opts ...grpc.CallOption) (*apiv1.GetDLQResponse, error) | ||
} | ||
|
||
//go:generate mockgen -destination=mock/processor_service.go -package=mock . ProcessorService | ||
|
||
// ProcessorService defines the methods of the ProcessorServiceClient that are currently used by the CLI. | ||
type ProcessorService interface { | ||
ListProcessors(ctx context.Context, in *apiv1.ListProcessorsRequest, opts ...grpc.CallOption) (*apiv1.ListProcessorsResponse, error) | ||
GetProcessor(ctx context.Context, in *apiv1.GetProcessorRequest, opts ...grpc.CallOption) (*apiv1.GetProcessorResponse, error) | ||
ListProcessorPlugins(ctx context.Context, in *apiv1.ListProcessorPluginsRequest, opts ...grpc.CallOption) (*apiv1.ListProcessorPluginsResponse, error) | ||
} |
Oops, something went wrong.