Skip to content

Commit 0b1817a

Browse files
authored
Update subscription_updater_test.go (#1281)
* Update subscription_updater_test.go * Update subscription_updater_test.go
1 parent 6b7e577 commit 0b1817a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

subscription_updater_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type updateFeatureSetOptions struct {
3030
Type string `jsonapi:"primary,subscription"`
3131
RunsCeiling *int `jsonapi:"attr,runs-ceiling,omitempty"`
3232
ContractStartAt *time.Time `jsonapi:"attr,contract-start-at,iso8601,omitempty"`
33+
EndAt *time.Time `jsonapi:"attr,end-at,iso8601,omitempty"`
3334
ContractUserLimit *int `jsonapi:"attr,contract-user-limit,omitempty"`
3435
ContractApplyLimit *int `jsonapi:"attr,contract-apply-limit,omitempty"`
3536
ContractManagedResourcesLimit *int `jsonapi:"attr,contract-managed-resources-limit,omitempty"`
@@ -55,11 +56,13 @@ func (b *organizationSubscriptionUpdater) WithBusinessPlan() *organizationSubscr
5556

5657
ceiling := 10
5758
start := time.Now()
59+
end := time.Now().AddDate(1, 0, 0) // 1 year from now
5860
userLimit := 1000
5961
applyLimit := 5000
6062

6163
b.updateOpts.RunsCeiling = &ceiling
6264
b.updateOpts.ContractStartAt = &start
65+
b.updateOpts.EndAt = &end
6366
b.updateOpts.ContractUserLimit = &userLimit
6467
b.updateOpts.ContractApplyLimit = &applyLimit
6568
return b
@@ -76,10 +79,12 @@ func (b *organizationSubscriptionUpdater) WithStandardEntitlementPlan() *organiz
7679
b.planName = "Standard (entitlement)"
7780

7881
start := time.Now()
82+
end := time.Now().AddDate(1, 0, 0) // 1 year from now
7983
ceiling := 1
8084
managedResourcesLimit := 1000
8185

8286
b.updateOpts.ContractStartAt = &start
87+
b.updateOpts.EndAt = &end
8388
b.updateOpts.RunsCeiling = &ceiling
8489
b.updateOpts.ContractManagedResourcesLimit = &managedResourcesLimit
8590
return b

0 commit comments

Comments
 (0)