Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Increased unit test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Dorfman committed Jan 17, 2023
1 parent e334352 commit 36a5775
Show file tree
Hide file tree
Showing 9 changed files with 877 additions and 198 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ ldflags:=\
-X $(import_path)/build.Commit=$(commit) \
$(NULL)

.PHONY: gen-mocks
gen-mocks:
mockgen -source=provider/cluster_resource.go -destination=provider/cluster_resource_mock.go -package provider

.PHONY: build
build:
go build -ldflags="$(ldflags)" -o ${BINARY}

generate-mocks:
mockgen -source=provider/cluster_resource.go -destination=provider/cluster_resource_mock.go -package provider

.PHONY: install
install: build
platform=$$(terraform version -json | jq -r .platform); \
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/openshift-online/terraform-provider-ocm
go 1.17

require (
github.com/golang/mock v1.4.4
github.com/hashicorp/go-version v1.3.0
github.com/hashicorp/terraform-plugin-framework v0.5.0
github.com/hashicorp/terraform-plugin-go v0.5.0
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down
Loading

0 comments on commit 36a5775

Please sign in to comment.