Skip to content

Commit

Permalink
Merge "Add fake generation directives discovery/support/mocks"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Yellick authored and Gerrit Code Review committed Nov 11, 2019
2 parents 31534f0 + 3f8ccfb commit 7254385
Show file tree
Hide file tree
Showing 20 changed files with 1,137 additions and 773 deletions.
9 changes: 3 additions & 6 deletions discovery/cmd/mocks/channel_response.go

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

9 changes: 3 additions & 6 deletions discovery/cmd/mocks/command_registrar.go

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

6 changes: 2 additions & 4 deletions discovery/cmd/mocks/local_response.go

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

6 changes: 2 additions & 4 deletions discovery/cmd/mocks/response_parser.go

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

9 changes: 3 additions & 6 deletions discovery/cmd/mocks/service_response.go

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

12 changes: 4 additions & 8 deletions discovery/cmd/mocks/stub.go

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

6 changes: 3 additions & 3 deletions discovery/support/acl/support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestConfigSequence(t *testing.T) {
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
chConfig := &mocks.ChanConfig{}
chConfig := &mocks.ChannelConfigGetter{}
r := &mocks.Resources{}
v := &mocks.ConfigtxValidator{}
if test.resourcesFound {
Expand Down Expand Up @@ -92,7 +92,7 @@ func TestEligibleForService(t *testing.T) {
v.VerifyByChannelReturnsOnCall(1, nil)
e.EvaluateSignedDataReturnsOnCall(0, errors.New("verification failed for local msp"))
e.EvaluateSignedDataReturnsOnCall(1, nil)
chConfig := &mocks.ChanConfig{}
chConfig := &mocks.ChannelConfigGetter{}
sup := acl.NewDiscoverySupport(v, e, chConfig)
err := sup.EligibleForService("mychannel", protoutil.SignedData{})
assert.Equal(t, "verification failed", err.Error())
Expand All @@ -106,7 +106,7 @@ func TestEligibleForService(t *testing.T) {

func TestSatisfiesPrincipal(t *testing.T) {
var (
chConfig = &mocks.ChanConfig{}
chConfig = &mocks.ChannelConfigGetter{}
resources = &mocks.Resources{}
mgr = &mocks.MSPManager{}
idThatDoesNotSatisfyPrincipal = &mocks.Identity{}
Expand Down

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

6 changes: 2 additions & 4 deletions discovery/support/mocks/channel_policy_manager_getter.go

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

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

Loading

0 comments on commit 7254385

Please sign in to comment.