Commit 011ac856 authored by Yacov Manevich's avatar Yacov Manevich Committed by Gerrit Code Review
Browse files

Merge "[FAB-14298] Remove V1_4_FABTOKEN_EXPERIMENTAL in v1.4" into release-1.4

parents 5ecaa3e5 1eeb1766
......@@ -27,18 +27,15 @@ const (
// ApplicationResourcesTreeExperimental is the capabilties string for private data using the experimental feature of collections/sideDB.
ApplicationResourcesTreeExperimental = "V1_1_RESOURCETREE_EXPERIMENTAL"
ApplicationFabTokenExperimental = "V1_4_FABTOKEN_EXPERIMENTAL"
)
// ApplicationProvider provides capabilities information for application level config.
type ApplicationProvider struct {
*registry
v11 bool
v12 bool
v13 bool
v11PvtDataExperimental bool
v14FabTokenExperimental bool
v11 bool
v12 bool
v13 bool
v11PvtDataExperimental bool
}
// NewApplicationProvider creates a application capabilities provider.
......@@ -49,7 +46,6 @@ func NewApplicationProvider(capabilities map[string]*cb.Capability) *Application
_, ap.v12 = capabilities[ApplicationV1_2]
_, ap.v13 = capabilities[ApplicationV1_3]
_, ap.v11PvtDataExperimental = capabilities[ApplicationPvtDataExperimental]
_, ap.v14FabTokenExperimental = capabilities[ApplicationFabTokenExperimental]
return ap
}
......@@ -113,9 +109,9 @@ func (ap *ApplicationProvider) KeyLevelEndorsement() bool {
return ap.v13
}
// FabToken returns true if support for fabric token functions is enabled.
// There is no fabtoken support in v1.4, so always return false
func (ap *ApplicationProvider) FabToken() bool {
return ap.v14FabTokenExperimental
return false
}
// HasCapability returns true if the capability is supported by this binary.
......@@ -132,8 +128,6 @@ func (ap *ApplicationProvider) HasCapability(capability string) bool {
return true
case ApplicationResourcesTreeExperimental:
return true
case ApplicationFabTokenExperimental:
return true
default:
return false
}
......
......@@ -62,11 +62,9 @@ func TestApplicationPvtDataExperimental(t *testing.T) {
assert.True(t, ap.PrivateChannelData())
}
func TestFabTokenExperimental(t *testing.T) {
ap := NewApplicationProvider(map[string]*cb.Capability{
ApplicationFabTokenExperimental: {},
})
assert.True(t, ap.FabToken())
func TestFabToken(t *testing.T) {
ap := NewApplicationProvider(map[string]*cb.Capability{})
assert.False(t, ap.FabToken())
}
func TestHasCapability(t *testing.T) {
......
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