Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 404 additions & 0 deletions .mockery.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion datacatalog/pkg/manager/interfaces/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
idl_datacatalog "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog"
)

//go:generate mockery --name=ArtifactManager --output=../mocks --case=underscore --with-expecter

type ArtifactManager interface {
CreateArtifact(ctx context.Context, request *idl_datacatalog.CreateArtifactRequest) (*idl_datacatalog.CreateArtifactResponse, error)
Expand Down
1 change: 0 additions & 1 deletion datacatalog/pkg/repositories/interfaces/artifact_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/datacatalog/pkg/repositories/models"
)

//go:generate mockery --name=ArtifactRepo --output=../mocks --case=underscore --with-expecter

type ArtifactRepo interface {
Create(ctx context.Context, in models.Artifact) error
Expand Down
1 change: 0 additions & 1 deletion datacatalog/pkg/repositories/interfaces/dataset_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/datacatalog/pkg/repositories/models"
)

//go:generate mockery --name=DatasetRepo --output=../mocks --case=underscore --with-expecter

type DatasetRepo interface {
Create(ctx context.Context, in models.Dataset) error
Expand Down
1 change: 0 additions & 1 deletion datacatalog/pkg/repositories/interfaces/partition_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/datacatalog/pkg/repositories/models"
)

//go:generate mockery --name=PartitionRepo --output=../mocks --case=underscore --with-expecter

type PartitionRepo interface {
Create(ctx context.Context, in models.Partition) error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/datacatalog/pkg/repositories/models"
)

//go:generate mockery --name=ReservationRepo --output=../mocks --case=underscore --with-expecter

// Interface to interact with Reservation Table
type ReservationRepo interface {
Expand Down
1 change: 0 additions & 1 deletion datacatalog/pkg/repositories/interfaces/tag_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/datacatalog/pkg/repositories/models"
)

//go:generate mockery --name=TagRepo --output=../mocks --case=underscore --with-expecter

type TagRepo interface {
Create(ctx context.Context, in models.Tag) error
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/auth/interfaces/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"
)

//go:generate mockery --all --case=underscore --with-expecter

type HandlerRegisterer interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/auth/interfaces/cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"
)

//go:generate mockery --name=CookieHandler --output=mocks/ --case=underscore --with-expecter

type CookieHandler interface {
SetTokenCookies(ctx context.Context, writer http.ResponseWriter, token *oauth2.Token) error
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/cloudevent/interfaces/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/golang/protobuf/proto"
)

//go:generate mockery --name=Publisher --output=../mocks --case=underscore --with-expecter

// Publisher Defines the interface for Publishing execution event to other services (AWS pub/sub, Kafka, Nats).
type Publisher interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/cloudevent/interfaces/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
cloudevents "github.com/cloudevents/sdk-go/v2"
)

//go:generate mockery --name=Sender --output=../mocks --case=underscore --with-expecter

// Sender Defines the interface for sending cloudevents.
type Sender interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/events/interfaces/node_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=NodeExecutionEventWriter --output=../mocks --case=underscore --with-expecter

type NodeExecutionEventWriter interface {
Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=WorkflowExecutionEventWriter --output=../mocks --case=underscore --with-expecter

type WorkflowExecutionEventWriter interface {
Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/flyteorg/flyte/flytestdlib/promutils"
)

//go:generate mockery --all --case=underscore --output=../mocks --case=underscore --with-expecter

type SendgridClient interface {
Send(email *mail.SGMailV3) (*rest.Response, error)
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/notifications/interfaces/emailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=Emailer --output=../mocks --case=underscore --with-expecter

// The implementation of Emailer needs to be passed to the implementation of Processor
// in order for emails to be sent.
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/notifications/interfaces/processor.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package interfaces

//go:generate mockery --name=Processor --output=../mocks --case=underscore --with-expecter

// Exposes the common methods required for a subscriber.
// There is one ProcessNotification per type.
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/async/notifications/interfaces/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/golang/protobuf/proto"
)

//go:generate mockery --name=Publisher --output=../mocks --case=underscore --with-expecter

// Note on Notifications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

// This interface is introduced to allow for mocking of the smtp.Client object.

//go:generate mockery --name=SMTPClient --output=../mocks --case=underscore --with-expecter
type SMTPClient interface {
Hello(localName string) error
Extension(ext string) (bool, string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type RemoveScheduleInput struct {
ScheduleNamePrefix string
}

//go:generate mockery --name=EventScheduler --output=../mocks --case=underscore --with-expecter

type EventScheduler interface {
// Schedules an event.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package interfaces

//go:generate mockery --name=WorkflowExecutor --output=../mocks --case=underscore --with-expecter

// Handles responding to scheduled workflow execution events and creating executions.
type WorkflowExecutor interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/clusterresource/interfaces/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=FlyteAdminDataProvider --output=../mocks --case=underscore --with-expecter

type FlyteAdminDataProvider interface {
GetClusterResourceAttributes(ctx context.Context, project, domain string) (*admin.ClusterResourceAttributes, error)
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/data/interfaces/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=RemoteURLInterface --output=../mocks --case=underscore --with-expecter

// Defines an interface for fetching pre-signed URLs.
type RemoteURLInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces"
)

//go:generate mockery --all --case=underscore --output=../mocks --case=underscore --with-expecter

type ExecutionTargetProvider interface {
GetExecutionTarget(initializationErrorCounter prometheus.Counter, k8sCluster interfaces.ClusterConfig) (*executioncluster.ExecutionTarget, error)
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=ExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow Executions
type ExecutionInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/launch_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=LaunchPlanInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Launch Plans
type LaunchPlanInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=MetricsInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte execution metrics
type MetricsInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/named_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=NamedEntityInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing metadata associated with NamedEntityIdentifiers
type NamedEntityInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/node_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=NodeExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow NodeExecutions
type NodeExecutionInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=ProjectInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing projects (and domains).
type ProjectInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=ResourceInterface --output=../mocks --case=underscore --with-expecter

// ResourceInterface manages project, domain and workflow -specific attributes.
type ResourceInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=SignalInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Signals
type SignalInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=TaskInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Tasks
type TaskInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/task_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=TaskExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow TaskExecutions
type TaskExecutionInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=VersionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte admin version
type VersionInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/manager/interfaces/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery --name=WorkflowInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflows
type WorkflowInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type DescriptionEntityCollectionOutput struct {
Entities []models.DescriptionEntity
}

//go:generate mockery --name=DescriptionEntityRepoInterface --output=../mocks --case=underscore --with-expecter

// DescriptionEntityRepoInterface Defines the interface for interacting with Description models.
type DescriptionEntityRepoInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models"
)

//go:generate mockery --name=ExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter

type ExecutionEventRepoInterface interface {
// Inserts a workflow execution event into the database store.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type NamedEntityCollectionOutput struct {
Entities []models.NamedEntity
}

//go:generate mockery --name=NamedEntityRepoInterface --output=../mocks --case=underscore --with-expecter

// Defines the interface for interacting with NamedEntity models
type NamedEntityRepoInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models"
)

//go:generate mockery --name=NodeExecutionEventRepoInterface --output=../mocks --case=underscore --with-expecter

type NodeExecutionEventRepoInterface interface {
// Inserts a node execution event into the database store.
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/repositories/interfaces/signal_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
)

//go:generate mockery --name=SignalRepoInterface --output=../mocks --case=underscore --with-expecter

// Defines the interface for interacting with signal models.
type SignalRepoInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/runtime/interfaces/cluster_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type Clusters struct {
DefaultExecutionLabel string `json:"defaultExecutionLabel"`
}

//go:generate mockery --name ClusterConfiguration --case=underscore --output=../mocks --case=underscore --with-expecter

// Provides values set in runtime configuration files.
// These files can be changed without requiring a full server restart.
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/runtime/interfaces/cluster_pools.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package interfaces

//go:generate mockery --name ClusterPoolAssignmentConfiguration --output=mocks --case=underscore --with-expecter

type ClusterPoolAssignment struct {
Pool string `json:"pool"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ type NamespaceMappingConfig struct {
TemplateData TemplateData `json:"templateData"`
}

//go:generate mockery --name NamespaceMappingConfiguration --output=../mocks --case=underscore --with-expecter

type NamespaceMappingConfiguration interface {
GetNamespaceTemplate() string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
type TierName = string

// Just incrementally start using mockery, replace with -all when working on https://github.com/flyteorg/flyte/issues/149
//go:generate mockery --name QualityOfServiceConfiguration --output=mocks --case=underscore --with-expecter

type QualityOfServiceSpec struct {
QueueingBudget config.Duration `json:"queueingBudget"`
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/runtime/interfaces/whitelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type WhitelistScope struct {
// Defines specific task types whitelisted for support.
type TaskTypeWhitelist = map[string][]WhitelistScope

//go:generate mockery --name WhitelistConfiguration --case=underscore --output=../mocks --case=underscore --with-expecter
type WhitelistConfiguration interface {
// Returns whitelisted task types defined in runtime configuration files.
GetTaskTypeWhitelist() TaskTypeWhitelist
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/workflowengine/interfaces/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1"
)

//go:generate mockery --name FlyteWorkflowBuilder --output=../mocks --case=underscore --with-expecter

// FlyteWorkflowBuilder produces a v1alpha1.FlyteWorkflow definition from a compiled workflow closure and execution inputs
type FlyteWorkflowBuilder interface {
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/pkg/workflowengine/interfaces/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/flyteorg/flyte/flytestdlib/storage"
)

//go:generate mockery --name=WorkflowExecutor --output=../mocks/ --case=underscore --with-expecter

type TaskResources struct {
Defaults runtime.TaskResourceSet
Expand Down
1 change: 0 additions & 1 deletion flyteadmin/scheduler/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models"
)

//go:generate mockery --name Executor --output=mocks --case=underscore --with-expecter

// Executor allows the ability to create scheduled executions on admin
type Executor interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models"
)

//go:generate mockery --name=SchedulableEntityRepoInterface --output=../mocks --case=underscore --with-expecter

// SchedulableEntityRepoInterface : An Interface for interacting with the schedulable entity in the database
type SchedulableEntityRepoInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/flyteorg/flyte/flyteadmin/scheduler/repositories/models"
)

//go:generate mockery --name=ScheduleEntitiesSnapShotRepoInterface --output=../mocks --case=underscore --with-expecter

// ScheduleEntitiesSnapShotRepoInterface : An Interface for interacting with the snapshot of schedulable entities in the database
type ScheduleEntitiesSnapShotRepoInterface interface {
Expand Down
1 change: 0 additions & 1 deletion flytectl/cmd/update/interfaces/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
)

//go:generate mockery --name=Updater --case=underscore --with-expecter

type Updater interface {
UpdateNamedEntity(ctx context.Context, name, project, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error
Expand Down
Loading
Loading