-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gateway: quick fix for mockgen Make targets (#2189)
This fixes a chicken-and-egg problem that we hit when trying to add a service since the package the code-generator reflects on also requires that the generated code is already correctly generated. Note the change in clients_mock.go is likely from the fact that this file was hand-edited in the past. I've also removed a Make target which simply didn't work because the relevant files didn't exist. Further, I noticed that running `make` produces files in mock_compliance_events/ which are not currently in source control. I haven't added them here as as I wasn't sure if this was intentional. In short, mock generation is a big mess still and needs to be cleaned up, but at least now `make` works again. Signed-off-by: Steven Danna <[email protected]> Signed-off-by: Vivek Singh <[email protected]>
- Loading branch information
1 parent
9b6e06a
commit d1a0654
Showing
6 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
components/automate-gateway/gateway/datacollector_bench_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !mockgen | ||
|
||
package gateway | ||
|
||
import ( | ||
|
2 changes: 2 additions & 0 deletions
2
components/automate-gateway/gateway/datacollector_internal_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !mockgen | ||
|
||
// | ||
// Author:: Salim Afiune <[email protected]> | ||
// Copyright:: Copyright 2018, Chef Software Inc. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !mockgen | ||
|
||
// | ||
// Author:: Salim Afiune <[email protected]> | ||
// Copyright:: Copyright 2018, Chef Software Inc. | ||
|
@@ -9,11 +11,12 @@ import ( | |
"io/ioutil" | ||
"testing" | ||
|
||
structpb "github.com/golang/protobuf/ptypes/struct" | ||
"github.com/stretchr/testify/assert" | ||
|
||
ingestProto "github.com/chef/automate/api/external/ingest/request" | ||
subject "github.com/chef/automate/components/automate-gateway/gateway" | ||
inspecEvent "github.com/chef/automate/components/compliance-service/ingest/events/inspec" | ||
structpb "github.com/golang/protobuf/ptypes/struct" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func readExample(path string) []byte { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !mockgen | ||
|
||
// | ||
// Author:: Salim Afiune <[email protected]> | ||
// Copyright:: Copyright 2018, Chef Software Inc. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 15 additions & 16 deletions
31
components/automate-gateway/gateway_mocks/mock_gateway/clients_mock.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.