Skip to content

Commit 4bf5e17

Browse files
author
serverpod_cloud
committed
fix: 5894756b946acb8cca73902199e4c8010b6b9482
1 parent 77cd707 commit 4bf5e17

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

serverpod_cloud_cli/lib/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract final class VersionConstants {
99

1010
/// The constraint for which SDK versions are supported for tenant projects
1111
/// in Serverpod Cloud. This is the highest tested version plus 0.1.
12-
static const supportedSdkConstraint = '>=$minSupportedSdkVersion <3.9.0';
12+
static const supportedSdkConstraint = '>=$minSupportedSdkVersion <3.11.0';
1313

1414
/// The minimum Serverpod version supported for tenant projects in Serverpod Cloud.
1515
static const minSupportedServerpodVersion = '2.3.0';

serverpod_cloud_cli/test/pubspec_validator_test.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,26 @@ dependencies:
6464
expect(result.first, contains('Unsupported sdk version constraint'));
6565
});
6666

67+
test(
68+
'Given a pubspec with a serverpod dependency and sdk version just above the supported range, when the projectDependencyIssues method is called, then the result contains the sdk error',
69+
() {
70+
final pubspec = TenantProjectPubspec(Pubspec.parse('''
71+
name: my_project
72+
environment:
73+
sdk: '3.11.0'
74+
dependencies:
75+
serverpod: ${ProjectFactory.validServerpodVersion}
76+
'''));
77+
78+
final result = pubspec.projectDependencyIssues();
79+
expect(
80+
result,
81+
isNotEmpty,
82+
reason: 'Version was allowed but expected to be rejected',
83+
);
84+
expect(result.first, contains('Unsupported sdk version constraint'));
85+
});
86+
6787
test(
6888
'Given a pubspec with a serverpod dependency and a too old sdk version, when the projectDependencyIssues method is called, then the result contains the sdk error',
6989
() {

0 commit comments

Comments
 (0)