Skip to content

Commit b3258d7

Browse files
author
serverpod_cloud
committed
feat: 1b6491660aab84a9d54cd489ce8e98a364b13207
1 parent 7b6fa42 commit b3258d7

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

ground_control_client/lib/src/test_tools/builders/plan_info_builder.dart

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
import 'package:ground_control_client/ground_control_client.dart';
22

3+
List<ProjectProductInfo> standardPlanTwoBundledProjectProfiles() {
4+
final starterCompute = ComputeProductInfo(
5+
size: ComputeSizeOption.small,
6+
productId: 'compute-starter:0',
7+
name: 'Compute',
8+
description: 'Compute for starter',
9+
);
10+
final starterDatabase = DatabaseProductInfo(
11+
size: DatabaseSizeOption.small,
12+
productId: 'database-starter:0',
13+
name: 'Database',
14+
description: 'Database for starter',
15+
cuHoursPerMonthLimit: 500,
16+
storageLimitGB: 2,
17+
);
18+
final starterCatalog = ComputeCatalogInfo(
19+
computes: [starterCompute],
20+
defaultCompute: starterCompute.size,
21+
scaling: ComputeScalingInfo(
22+
defaultMinReplicas: 1,
23+
defaultMaxReplicas: 1,
24+
allowedReplicasMin: 1,
25+
allowedReplicasMax: 1,
26+
),
27+
);
28+
final starterDbCatalog = DatabaseCatalogInfo(
29+
databases: [starterDatabase],
30+
defaultDatabase: starterDatabase.size,
31+
);
32+
final starterProject = ProjectProductInfo(
33+
productId: 'starter-project:0',
34+
name: 'Starter',
35+
description: 'Cost-optimized',
36+
computeCatalog: starterCatalog,
37+
databaseCatalog: starterDbCatalog,
38+
);
39+
return [starterProject, ..._standardPlanBundledProjectProducts()];
40+
}
41+
342
List<ProjectProductInfo> _standardPlanBundledProjectProducts() {
443
final computeSmall = ComputeProductInfo(
544
size: ComputeSizeOption.small,
@@ -76,7 +115,7 @@ List<ProjectProductInfo> _standardPlanBundledProjectProducts() {
76115
ProjectProductInfo(
77116
productId: 'growth:0',
78117
name: 'Growth',
79-
description: 'Bundled project product for standard plan fixtures',
118+
description: 'Performance & autoscaling',
80119
computeCatalog: computeCatalog,
81120
databaseCatalog: databaseCatalog,
82121
),
@@ -122,6 +161,12 @@ class PlanInfoBuilder {
122161
return this;
123162
}
124163

164+
PlanInfoBuilder withStandardPlanTwoProfiles() {
165+
withStandardPlan();
166+
_projectProductInfo = standardPlanTwoBundledProjectProfiles();
167+
return this;
168+
}
169+
125170
PlanInfoBuilder withStaticTrailOf30Days() {
126171
_trialEndDate = DateTime.now().add(Duration(days: 30));
127172
_trialEndDate = null;

0 commit comments

Comments
 (0)