mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat!: add table format to 'coder license ls', 'license_expires' --> 'license_expires_human' (#8421)
* feat: add table format to 'coder license ls' * feat: license expires_at to table view * change: `license_expires` to `license_expires_human` and `license_expires` is unix timestamp
This commit is contained in:
@@ -31,7 +31,7 @@ func TestPostLicense(t *testing.T) {
|
||||
assert.GreaterOrEqual(t, respLic.ID, int32(0))
|
||||
// just a couple spot checks for sanity
|
||||
assert.Equal(t, "testing", respLic.Claims["account_id"])
|
||||
features, err := respLic.Features()
|
||||
features, err := respLic.FeaturesClaims()
|
||||
require.NoError(t, err)
|
||||
assert.EqualValues(t, 1, features[codersdk.FeatureAuditLog])
|
||||
})
|
||||
@@ -102,7 +102,7 @@ func TestGetLicense(t *testing.T) {
|
||||
assert.Equal(t, int32(1), licenses[0].ID)
|
||||
assert.Equal(t, "testing", licenses[0].Claims["account_id"])
|
||||
|
||||
features, err := licenses[0].Features()
|
||||
features, err := licenses[0].FeaturesClaims()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[codersdk.FeatureName]int64{
|
||||
codersdk.FeatureAuditLog: 1,
|
||||
@@ -114,7 +114,7 @@ func TestGetLicense(t *testing.T) {
|
||||
assert.Equal(t, "testing2", licenses[1].Claims["account_id"])
|
||||
assert.Equal(t, true, licenses[1].Claims["trial"])
|
||||
|
||||
features, err = licenses[1].Features()
|
||||
features, err = licenses[1].FeaturesClaims()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[codersdk.FeatureName]int64{
|
||||
codersdk.FeatureUserLimit: 200,
|
||||
|
||||
Reference in New Issue
Block a user