Satellite/console: Reduce free account limits

Update free account limits to segments(10k), storage(25gb), and
bandwidth(25gb)

Issue: https://github.com/storj/storj-private/issues/182

Change-Id: I59250fc9f1eebc812bc85ecfbc2924f8c4369064
This commit is contained in:
Lizzy Thomson 2023-03-28 12:30:43 -06:00 committed by Storj Robot
parent 54b6e1614a
commit 63533c628b
5 changed files with 19 additions and 19 deletions

View File

@ -47,7 +47,7 @@ func TestProjectGet(t *testing.T) {
t.Run("OK", func(t *testing.T) {
link := "http://" + address.String() + "/api/projects/" + project.ID.String()
expected := fmt.Sprintf(
`{"id":"%s","publicId":"%s","name":"%s","description":"%s","userAgent":null,"ownerId":"%s","rateLimit":null,"burstLimit":null,"maxBuckets":null,"createdAt":"%s","memberCount":0,"storageLimit":"25.00 GB","bandwidthLimit":"25.00 GB","userSpecifiedStorageLimit":null,"userSpecifiedBandwidthLimit":null,"segmentLimit":150000}`,
`{"id":"%s","publicId":"%s","name":"%s","description":"%s","userAgent":null,"ownerId":"%s","rateLimit":null,"burstLimit":null,"maxBuckets":null,"createdAt":"%s","memberCount":0,"storageLimit":"25.00 GB","bandwidthLimit":"25.00 GB","userSpecifiedStorageLimit":null,"userSpecifiedBandwidthLimit":null,"segmentLimit":10000}`,
project.ID.String(),
project.PublicID.String(),
project.Name,
@ -88,7 +88,7 @@ func TestProjectLimit(t *testing.T) {
linkLimit := "http://" + address.String() + "/api/projects/" + project.ID.String() + "/limit"
t.Run("Get OK", func(t *testing.T) {
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"25.00 GB","bytes":25000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"25.00 GB","bytes":25000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
})
t.Run("Get Not Found", func(t *testing.T) {
@ -136,7 +136,7 @@ func TestProjectLimit(t *testing.T) {
require.Equal(t, http.StatusOK, response.StatusCode)
require.NoError(t, response.Body.Close())
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.0 TiB","bytes":1099511627776},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.0 TiB","bytes":1099511627776},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
req, err = http.NewRequestWithContext(ctx, http.MethodPut, linkLimit+"?usage=1GB", nil)
require.NoError(t, err)
@ -147,7 +147,7 @@ func TestProjectLimit(t *testing.T) {
require.Equal(t, http.StatusOK, response.StatusCode)
require.NoError(t, response.Body.Close())
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
})
t.Run("Update Bandwidth", func(t *testing.T) {
@ -160,7 +160,7 @@ func TestProjectLimit(t *testing.T) {
require.Equal(t, http.StatusOK, response.StatusCode)
require.NoError(t, response.Body.Close())
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
})
t.Run("Update Rate", func(t *testing.T) {
@ -173,7 +173,7 @@ func TestProjectLimit(t *testing.T) {
require.Equal(t, http.StatusOK, response.StatusCode)
require.NoError(t, response.Body.Close())
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
})
t.Run("Update Buckets", func(t *testing.T) {
@ -186,7 +186,7 @@ func TestProjectLimit(t *testing.T) {
require.Equal(t, http.StatusOK, response.StatusCode)
require.NoError(t, response.Body.Close())
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":2000,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken)
assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":2000,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken)
})
t.Run("Update Segment Limit", func(t *testing.T) {

View File

@ -66,19 +66,19 @@ type UsageLimitsConfig struct {
// StorageLimitConfig is a configuration struct for default storage per-project usage limits.
type StorageLimitConfig struct {
Free memory.Size `help:"the default free-tier storage usage limit" default:"150.00GB" testDefault:"25.00 GB"`
Free memory.Size `help:"the default free-tier storage usage limit" default:"25.00GB" testDefault:"25.00 GB"`
Paid memory.Size `help:"the default paid-tier storage usage limit" default:"25.00TB" testDefault:"25.00 GB"`
}
// BandwidthLimitConfig is a configuration struct for default bandwidth per-project usage limits.
type BandwidthLimitConfig struct {
Free memory.Size `help:"the default free-tier bandwidth usage limit" default:"150.00GB" testDefault:"25.00 GB"`
Free memory.Size `help:"the default free-tier bandwidth usage limit" default:"25.00GB" testDefault:"25.00 GB"`
Paid memory.Size `help:"the default paid-tier bandwidth usage limit" default:"100.00TB" testDefault:"25.00 GB"`
}
// SegmentLimitConfig is a configuration struct for default segments per-project usage limits.
type SegmentLimitConfig struct {
Free int64 `help:"the default free-tier segment usage limit" default:"150000"`
Free int64 `help:"the default free-tier segment usage limit" default:"10000"`
Paid int64 `help:"the default paid-tier segment usage limit" default:"100000000"`
}

View File

@ -329,7 +329,7 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# console.terms-and-conditions-url: https://www.storj.io/terms-of-service/
# the default free-tier bandwidth usage limit
# console.usage-limits.bandwidth.free: 150.00 GB
# console.usage-limits.bandwidth.free: 25.00 GB
# the default paid-tier bandwidth usage limit
# console.usage-limits.bandwidth.paid: 100.00 TB
@ -341,13 +341,13 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# console.usage-limits.project.paid: 3
# the default free-tier segment usage limit
# console.usage-limits.segment.free: 150000
# console.usage-limits.segment.free: 10000
# the default paid-tier segment usage limit
# console.usage-limits.segment.paid: 100000000
# the default free-tier storage usage limit
# console.usage-limits.storage.free: 150.00 GB
# console.usage-limits.storage.free: 25.00 GB
# the default paid-tier storage usage limit
# console.usage-limits.storage.paid: 25.00 TB

View File

@ -44,26 +44,26 @@ const plans = ref<PricingPlanInfo[]>([
new PricingPlanInfo(
PricingPlanType.PRO,
'Pro Account',
'150 GB Free',
'25 GB Free',
'Only pay for what you need. $4/TB stored per month* $7/TB for bandwidth.',
'*Additional per-segment fee of $0.0000088 applies.',
null,
null,
'Add a credit card to activate your Pro Account.<br><br>Get 150GB free storage and bandwidth. Only pay for what you use beyond that.',
'Add a credit card to activate your Pro Account.<br><br>Get 25GB free storage and bandwidth. Only pay for what you use beyond that.',
'No charge today',
'150GB Free',
'25GB Free',
),
new PricingPlanInfo(
PricingPlanType.FREE,
'Free Account',
'Limited',
'Free usage up to 150GB storage and 150GB bandwidth per month.',
'Free usage up to 25GB storage and 25GB bandwidth per month.',
null,
null,
null,
'Start for free to try Storj and upgrade later.',
null,
'Limited 150',
'Limited 25',
),
]);

View File

@ -49,7 +49,7 @@
>
<div class="register-area__input-area__container__title-area" @click.stop="toggleDropdown">
<div class="register-area__input-area__container__title-container">
<h1 class="register-area__input-area__container__title-area__title">Get 150 GB Free</h1>
<h1 class="register-area__input-area__container__title-area__title">Get 25 GB Free</h1>
</div>
<div class="register-area__input-area__expand">
<div class="register-area__input-area__info-button">