Skip to content

Commit

Permalink
[licensor]: remove prebuilds from the team level license
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Emms committed Mar 8, 2022
1 parent d6de107 commit fa9e838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions components/licensor/ee/pkg/licensor/licensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ type allowance struct {

var allowanceMap = map[LicenseLevel]allowance{
LevelTeam: {
PrebuildTime: 50 * time.Hour,
Features: featureSet{
FeaturePrebuild: struct{}{},

FeatureAdminDashboard: struct{}{},
},
},
Expand Down
15 changes: 3 additions & 12 deletions components/licensor/ee/pkg/licensor/licensor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,7 @@ func TestFeatures(t *testing.T) {
FeaturePrebuild,
}, LicenseTypeGitpod, seats},

{"Gitpod (over seats): no license", true, LicenseLevel(0), []Feature{
FeatureAdminDashboard,
FeaturePrebuild,
}, LicenseTypeGitpod, 11},
{"Gitpod (over seats): no license", true, LicenseLevel(0), []Feature{FeatureAdminDashboard}, LicenseTypeGitpod, 11},
{"Gitpod (over seats): invalid license level", false, LicenseLevel(666), []Feature{}, LicenseTypeGitpod, seats + 1},
{"Gitpod (over seats): enterprise license", false, LevelEnterprise, []Feature{}, LicenseTypeGitpod, seats + 1},

Expand Down Expand Up @@ -264,14 +261,8 @@ func TestFeatures(t *testing.T) {
FeaturePrebuild,
}, LicenseTypeReplicated, seats + 1},

{"Replicated (over seats - fallback): invalid license level", false, LicenseLevel(666), []Feature{
FeatureAdminDashboard,
FeaturePrebuild,
}, LicenseTypeReplicated, seats + 1},
{"Replicated (over seats - fallback): enterprise license", false, LevelEnterprise, []Feature{
FeatureAdminDashboard,
FeaturePrebuild,
}, LicenseTypeReplicated, seats + 1},
{"Replicated (over seats - fallback): invalid license level", false, LicenseLevel(666), []Feature{FeatureAdminDashboard}, LicenseTypeReplicated, seats + 1},
{"Replicated (over seats - fallback): enterprise license", false, LevelEnterprise, []Feature{FeatureAdminDashboard}, LicenseTypeReplicated, seats + 1},
}

for _, test := range tests {
Expand Down

0 comments on commit fa9e838

Please sign in to comment.