Skip to content

Commit

Permalink
gen mocks in test pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-hontarau committed Aug 8, 2024
1 parent 8a16206 commit 644cdb7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
4 changes: 3 additions & 1 deletion cmd/internal/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package internal
import (
"context"
"fmt"

"github.com/caarlos0/env/v9"
"github.com/spacelift-io/awsautoscalr/internal"
"golang.org/x/exp/slog"

"github.com/spacelift-io/awsautoscalr/internal"
)

func Handle(ctx context.Context, logger *slog.Logger) error {
Expand Down
5 changes: 3 additions & 2 deletions internal/auto_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package internal
import (
"context"
"fmt"
"time"

autoscalingtypes "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"golang.org/x/exp/slog"
"time"
)

//go:generate mockery --inpackage --name ControllerInterface --filename mock_controller_test.go
//go:generate mockery --output ./ --name ControllerInterface --filename mock_controller_test.go --outpkg internal_test
type ControllerInterface interface {
DescribeInstances(ctx context.Context, instanceIDs []string) (instances []ec2types.Instance, err error)
GetAutoscalingGroup(ctx context.Context) (out *autoscalingtypes.AutoScalingGroup, err error)
Expand Down
36 changes: 19 additions & 17 deletions internal/mock_controller_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 644cdb7

Please sign in to comment.