licensing: fix setup for creating license keys locally and for testing features in a local instance
Created by: miveronese
This PR fixes the setup for generating license keys locally, so we can manually test, in a local instance, if a feature are available or not depending on the plan used.
Documentation on how to generate a license key locally and how to test a new feature will be added in the next PR.
Test plan
Manually tested that we can successfully generated a license key with the following steps
-
go run ./enterprise/internal/license/generate-license.go -private-key ../dev-private/enterprise/dev/test-license-generation-key.pem -tags=plan:team-0 -users=10 -expires=8784h .
(You can replace theteam-0
with other plans) -
added the new license key to our dev-private site configuration; restarted SG.
-
when the repo-updater called
licensing.Check(licensing.FeatureACLs)
(in perms_syncer.go), thecrypto/rsa: verification error
wasn't displayed anymore and all worked as expected.