Commit dbc194a9 authored by Alessandro Sorniotti's avatar Alessandro Sorniotti Committed by Yacov Manevich
Browse files

[FAB-11551] Clone v1.2 validation logic



The validation logic for 1.2 should be cloned for 1.3. The idea is that 
the 1.2 validation logic is no longer changed. All edits for 1.3 release 
go into the 1.3 clone.

Change-Id: Id94d59f3a51b65342d8277bc89e322617393a61d
Signed-off-by: default avatarAlessandro Sorniotti <ale.linux@sopit.net>
Signed-off-by: default avatarMatthias Neugschwandtner <eug@zurich.ibm.com>
parent 2178e6eb
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// Capabilities is an autogenerated mock type for the Capabilities type
type Capabilities struct {
mock.Mock
}
// ACLs provides a mock function with given fields:
func (_m *Capabilities) ACLs() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// CollectionUpgrade provides a mock function with given fields:
func (_m *Capabilities) CollectionUpgrade() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// ForbidDuplicateTXIdInBlock provides a mock function with given fields:
func (_m *Capabilities) ForbidDuplicateTXIdInBlock() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// KeyLevelEndorsement provides a mock function with given fields:
func (_m *Capabilities) KeyLevelEndorsement() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// MetadataLifecycle provides a mock function with given fields:
func (_m *Capabilities) MetadataLifecycle() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// PrivateChannelData provides a mock function with given fields:
func (_m *Capabilities) PrivateChannelData() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Supported provides a mock function with given fields:
func (_m *Capabilities) Supported() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// V1_1Validation provides a mock function with given fields:
func (_m *Capabilities) V1_1Validation() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// V1_2Validation provides a mock function with given fields:
func (_m *Capabilities) V1_2Validation() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// V1_3Validation provides a mock function with given fields:
func (_m *Capabilities) V1_3Validation() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
import validation "github.com/hyperledger/fabric/core/handlers/validation/api/identities"
// IdentityDeserializer is an autogenerated mock type for the IdentityDeserializer type
type IdentityDeserializer struct {
mock.Mock
}
// DeserializeIdentity provides a mock function with given fields: serializedIdentity
func (_m *IdentityDeserializer) DeserializeIdentity(serializedIdentity []byte) (validation.Identity, error) {
ret := _m.Called(serializedIdentity)
var r0 validation.Identity
if rf, ok := ret.Get(0).(func([]byte) validation.Identity); ok {
r0 = rf(serializedIdentity)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(validation.Identity)
}
}
var r1 error
if rf, ok := ret.Get(1).(func([]byte) error); ok {
r1 = rf(serializedIdentity)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import common "github.com/hyperledger/fabric/protos/common"
import mock "github.com/stretchr/testify/mock"
// PolicyEvaluator is an autogenerated mock type for the PolicyEvaluator type
type PolicyEvaluator struct {
mock.Mock
}
// Evaluate provides a mock function with given fields: policyBytes, signatureSet
func (_m *PolicyEvaluator) Evaluate(policyBytes []byte, signatureSet []*common.SignedData) error {
ret := _m.Called(policyBytes, signatureSet)
var r0 error
if rf, ok := ret.Get(0).(func([]byte, []*common.SignedData) error); ok {
r0 = rf(policyBytes, signatureSet)
} else {
r0 = ret.Error(0)
}
return r0
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
import validation "github.com/hyperledger/fabric/core/handlers/validation/api/state"
// StateFetcher is an autogenerated mock type for the StateFetcher type
type StateFetcher struct {
mock.Mock
}
// FetchState provides a mock function with given fields:
func (_m *StateFetcher) FetchState() (validation.State, error) {
ret := _m.Called()
var r0 validation.State
if rf, ok := ret.Get(0).(func() validation.State); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(validation.State)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment