Skip to content

Commit

Permalink
update mock test
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and boyamurthy committed Dec 11, 2023
1 parent dc006dd commit 9b2cb30
Show file tree
Hide file tree
Showing 11 changed files with 836 additions and 156 deletions.
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,24 @@ int-test:
gocover:
go tool cover -html=c.out

check: mock-test gosec
check: mocks gosec
gofmt -w ./.
golint ./...
go vet

mocks:
ifeq (, $(shell which mockery))
go install github.com/vektra/mockery/v2@latest
$(shell $(GOBIN)/mockery --all)
else
mockery --all

endif
gosec:
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...
ifeq (, $(shell which gosec))
go install github.com/securego/gosec/v2/cmd/gosec@latest
$(shell $(GOBIN)/gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
else
$(shell gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
endif
@echo "Logs are stored at gosec.log, Outputfile at gosecresults.csv"

2 changes: 1 addition & 1 deletion api/api_query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (qp *QueryParams) Async(value bool) QueryParamsEncoder {
return qp
}

// Encode encodes the values into ``URL encoded'' form
// Encode encodes the values into URL encoded form
// ("bar=baz&foo=quux") sorted by key.
func (qp *QueryParams) Encode() string {
q := make(url.Values)
Expand Down
1 change: 1 addition & 0 deletions metrics_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type CopySessionTypeEnum string

/*
Intervals of which metrics can be provided
Enum:
[ Twenty_Sec, Five_Mins, One_Hour, One_Day ]
*/
Expand Down
90 changes: 68 additions & 22 deletions mocks/ApiClient.go

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

Loading

0 comments on commit 9b2cb30

Please sign in to comment.