Check license expiration, disable license and notify administrator (#14420)
* Check license expiration and notify administrator
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5ad3eaf7ee
Коммит
58305b080f
@@ -116,6 +116,15 @@ func TestLicenseIsExpired(t *testing.T) {
|
||||
assert.False(t, l1.IsExpired())
|
||||
}
|
||||
|
||||
func TestLicenseIsPastGracePeriod(t *testing.T) {
|
||||
l1 := License{}
|
||||
l1.ExpiresAt = GetMillis() - LICENSE_GRACE_PERIOD - 1000
|
||||
assert.True(t, l1.IsPastGracePeriod())
|
||||
|
||||
l1.ExpiresAt = GetMillis() + 1000
|
||||
assert.False(t, l1.IsPastGracePeriod())
|
||||
}
|
||||
|
||||
func TestLicenseIsStarted(t *testing.T) {
|
||||
l1 := License{}
|
||||
l1.StartsAt = GetMillis() - 1000
|
||||
|
||||
Ссылка в новой задаче
Block a user