Update Shared Channels to respect future features (#16627)
* Update Shared Channels to respect future features * Fix specs
Этот коммит содержится в:
@@ -236,7 +236,7 @@ func (f *Features) SetDefaults() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if f.SharedChannels == nil {
|
if f.SharedChannels == nil {
|
||||||
f.SharedChannels = NewBool(false)
|
f.SharedChannels = NewBool(*f.FutureFeatures)
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.RemoteClusterService == nil {
|
if f.RemoteClusterService == nil {
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ func TestLicenseFeaturesToMap(t *testing.T) {
|
|||||||
CheckTrue(t, m["custom_permissions_schemes"].(bool))
|
CheckTrue(t, m["custom_permissions_schemes"].(bool))
|
||||||
CheckTrue(t, m["id_loaded"].(bool))
|
CheckTrue(t, m["id_loaded"].(bool))
|
||||||
CheckTrue(t, m["future"].(bool))
|
CheckTrue(t, m["future"].(bool))
|
||||||
CheckFalse(t, m["shared_channels"].(bool))
|
CheckTrue(t, m["shared_channels"].(bool))
|
||||||
CheckFalse(t, m["remote_cluster_service"].(bool))
|
CheckTrue(t, m["remote_cluster_service"].(bool))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
||||||
@@ -59,8 +59,8 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
|||||||
CheckTrue(t, *f.CustomPermissionsSchemes)
|
CheckTrue(t, *f.CustomPermissionsSchemes)
|
||||||
CheckTrue(t, *f.GuestAccountsPermissions)
|
CheckTrue(t, *f.GuestAccountsPermissions)
|
||||||
CheckTrue(t, *f.IDLoadedPushNotifications)
|
CheckTrue(t, *f.IDLoadedPushNotifications)
|
||||||
CheckFalse(t, *f.SharedChannels)
|
CheckTrue(t, *f.SharedChannels)
|
||||||
CheckFalse(t, *f.RemoteClusterService)
|
CheckTrue(t, *f.RemoteClusterService)
|
||||||
CheckTrue(t, *f.FutureFeatures)
|
CheckTrue(t, *f.FutureFeatures)
|
||||||
|
|
||||||
f = Features{}
|
f = Features{}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user