Skip to content

Commit

Permalink
Improve coverage on ASG path
Browse files Browse the repository at this point in the history
  • Loading branch information
mproffitt committed Nov 12, 2023
1 parent 5abe819 commit 36747dc
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 151 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $ docker run --rm -v $(pwd):/app -v ~/.cache/golangci-lint/v1.54.2:/root/.cache
$ go test ./... -coverprofile=cover.out && go tool cover -html=cover.out
? github.com/giantswarm/crossplane-fn-describe-nodegroups/pkg/composite/v1beta1 [no test files]
? github.com/giantswarm/crossplane-fn-describe-nodegroups/pkg/input/v1beta1 [no test files]
ok github.com/giantswarm/crossplane-fn-describe-nodegroups 0.022s coverage: 69.9% of statements
ok github.com/giantswarm/crossplane-fn-describe-nodegroups 0.028s coverage: 74.9% of statements
$ docker buildx build .
```
Expand Down
9 changes: 0 additions & 9 deletions awsapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import (

// EC2API Describes the functions required to access data on the AWS EC2 api
type AwsEc2Api interface {
DescribeLaunchTemplates(ctx context.Context,
params *ec2.DescribeLaunchTemplatesInput,
optFns ...func(*ec2.Options)) (*ec2.DescribeLaunchTemplatesOutput, error)

DescribeLaunchTemplateVersions(ctx context.Context,
params *ec2.DescribeLaunchTemplateVersionsInput,
optFns ...func(*ec2.Options)) (*ec2.DescribeLaunchTemplateVersionsOutput, error)
Expand All @@ -26,11 +22,6 @@ func DescribeLaunchTemplateVersions(c context.Context, api AwsEc2Api, input *ec2
return api.DescribeLaunchTemplateVersions(c, input)
}

// DescribeLaunchTemplates Find launch templates for a given nodegroup
func DescribeLaunchTemplates(c context.Context, api AwsEc2Api, input *ec2.DescribeLaunchTemplatesInput) (*ec2.DescribeLaunchTemplatesOutput, error) {
return api.DescribeLaunchTemplates(c, input)
}

// EKSNodegroupAPI describes the AWS functions required by this composition function
// in order to track nodegroup objects for the desired cluster
type AwsEksApi interface {
Expand Down
Loading

0 comments on commit 36747dc

Please sign in to comment.