Skip to content

Commit a7acf25

Browse files
authored
CDRIVER-5987 remove serverless testing (#2116)
1 parent 9af0467 commit a7acf25

File tree

7 files changed

+1
-92
lines changed

7 files changed

+1
-92
lines changed

.evergreen/scripts/run-auth-tests.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,6 @@ if [[ "${ssl}" != "OFF" ]]; then
173173
"${mongoc_ping:?}" "${atlas_tls12:?}&${c_timeout:?}"
174174
echo "Connecting to Atlas with only TLS 1.2 enabled with SRV"
175175
"${mongoc_ping:?}" "${atlas_tls12_srv:?}${c_timeout:?}"
176-
HAS_CIPHERSUITES_FOR_SERVERLESS="YES"
177-
if [[ "${OSTYPE}" == "cygwin" ]]; then
178-
# Windows Server 2008 hosts do not appear to share TLS 1.2 cipher suites with Atlas Serverless.
179-
WINDOWS_OSNAME="$(systeminfo | grep 'OS Name:' | awk -F ':' '{print $2}')"
180-
if [[ "${WINDOWS_OSNAME}" == *"Windows Server 2008"* ]]; then
181-
echo "Detected Windows Server 2008 ... skipping Atlas Serverless test due to no shared cipher suites."
182-
HAS_CIPHERSUITES_FOR_SERVERLESS="NO"
183-
fi
184-
fi
185-
if [[ "${HAS_CIPHERSUITES_FOR_SERVERLESS}" == "YES" ]]; then
186-
echo "Connecting to Atlas Serverless with SRV"
187-
"${mongoc_ping:?}" "${atlas_serverless_srv:?}/?${c_timeout:?}"
188-
echo "Connecting to Atlas Serverless"
189-
"${mongoc_ping:?}" "${atlas_serverless:?}&${c_timeout:?}"
190-
fi
191176

192177
echo "Connecting to Atlas (cloud-prod) with X509"
193178
"${mongoc_ping:?}" "${atlas_x509:?}&tlsCertificateKeyFile=${atlas_x509_path:?}&${c_timeout:?}"

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ Additional environment variables:
165165
* `MONGOC_TEST_MONITORING_VERBOSE`: set to `on` for verbose output from
166166
Application Performance Monitoring tests.
167167
* `MONGOC_TEST_COMPRESSORS=snappy,zlib`: wire protocol compressors to use
168-
* `MONGOC_TEST_IS_SERVERLESS` (bool): defaults to `false`. Used to indicate
169-
that tests are run against a serverless cluster.
170168

171169
If you start `mongod` with SSL, set these variables to configure how
172170
`test-libmongoc` connects to it:

src/libmongoc/tests/test-libmongoc.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,21 +2431,6 @@ test_framework_skip_if_no_setenv(void)
24312431
return 1;
24322432
}
24332433

2434-
bool
2435-
test_framework_is_serverless(void)
2436-
{
2437-
return test_framework_getenv_bool("MONGOC_TEST_IS_SERVERLESS");
2438-
}
2439-
2440-
int
2441-
test_framework_skip_if_serverless(void)
2442-
{
2443-
if (test_framework_is_serverless()) {
2444-
return 0; // do not proceed
2445-
}
2446-
return 1; // proceed.
2447-
}
2448-
24492434
static char MONGOC_TEST_UNIQUE[32];
24502435

24512436
#if defined(_MSC_VER) && defined(_WIN64)

src/libmongoc/tests/test-libmongoc.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,6 @@ test_framework_skip_if_no_getlasterror(void);
281281
int
282282
test_framework_skip_if_no_exhaust_cursors(void);
283283

284-
bool
285-
test_framework_is_serverless(void);
286-
287-
int
288-
test_framework_skip_if_serverless(void);
289-
290284
bool
291285
test_framework_is_loadbalanced(void);
292286

src/libmongoc/tests/test-mongoc-client-side-encryption.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7149,8 +7149,6 @@ test_client_side_encryption_install(TestSuite *suite)
71497149
NULL /* ctx */,
71507150
test_framework_skip_if_no_client_side_encryption,
71517151
test_framework_skip_if_max_wire_version_less_than_21,
7152-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7153-
test_framework_skip_if_serverless,
71547152
test_framework_skip_if_single);
71557153

71567154
TestSuite_AddFull(suite,
@@ -7160,8 +7158,6 @@ test_client_side_encryption_install(TestSuite *suite)
71607158
NULL /* ctx */,
71617159
test_framework_skip_if_no_client_side_encryption,
71627160
test_framework_skip_if_max_wire_version_less_than_21,
7163-
// Remove skip_if_serverless once DRIVERS-2589 is resolved
7164-
test_framework_skip_if_serverless,
71657161
test_framework_skip_if_single);
71667162

71677163
TestSuite_AddFull(suite,
@@ -7171,8 +7167,6 @@ test_client_side_encryption_install(TestSuite *suite)
71717167
NULL /* ctx */,
71727168
test_framework_skip_if_no_client_side_encryption,
71737169
test_framework_skip_if_max_wire_version_less_than_21,
7174-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7175-
test_framework_skip_if_serverless,
71767170
test_framework_skip_if_single);
71777171

71787172
TestSuite_AddFull(suite,
@@ -7182,8 +7176,6 @@ test_client_side_encryption_install(TestSuite *suite)
71827176
NULL /* ctx */,
71837177
test_framework_skip_if_no_client_side_encryption,
71847178
test_framework_skip_if_max_wire_version_less_than_21,
7185-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7186-
test_framework_skip_if_serverless,
71877179
test_framework_skip_if_single);
71887180

71897181
TestSuite_AddFull(suite,
@@ -7193,8 +7185,6 @@ test_client_side_encryption_install(TestSuite *suite)
71937185
NULL /* ctx */,
71947186
test_framework_skip_if_no_client_side_encryption,
71957187
test_framework_skip_if_max_wire_version_less_than_21,
7196-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7197-
test_framework_skip_if_serverless,
71987188
test_framework_skip_if_single);
71997189

72007190
TestSuite_AddFull(suite,
@@ -7237,8 +7227,6 @@ test_client_side_encryption_install(TestSuite *suite)
72377227
NULL /* ctx */,
72387228
test_framework_skip_if_no_client_side_encryption,
72397229
test_framework_skip_if_max_wire_version_less_than_21,
7240-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7241-
test_framework_skip_if_serverless,
72427230
test_framework_skip_if_single);
72437231

72447232
TestSuite_AddFull(suite,
@@ -7284,8 +7272,6 @@ test_client_side_encryption_install(TestSuite *suite)
72847272
NULL,
72857273
test_framework_skip_if_no_client_side_encryption,
72867274
test_framework_skip_if_max_wire_version_less_than_21,
7287-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7288-
test_framework_skip_if_serverless,
72897275
test_framework_skip_if_single);
72907276

72917277
TestSuite_AddFull(suite,
@@ -7296,8 +7282,6 @@ test_client_side_encryption_install(TestSuite *suite)
72967282
NULL,
72977283
test_framework_skip_if_no_client_side_encryption,
72987284
test_framework_skip_if_max_wire_version_less_than_21,
7299-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7300-
test_framework_skip_if_serverless,
73017285
test_framework_skip_if_single);
73027286
TestSuite_AddFull(suite,
73037287
"/client_side_encryption/createEncryptedCollection/"
@@ -7307,8 +7291,6 @@ test_client_side_encryption_install(TestSuite *suite)
73077291
NULL,
73087292
test_framework_skip_if_no_client_side_encryption,
73097293
test_framework_skip_if_max_wire_version_less_than_21,
7310-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7311-
test_framework_skip_if_serverless,
73127294
test_framework_skip_if_single);
73137295
TestSuite_AddFull(suite,
73147296
"/client_side_encryption/createEncryptedCollection/insert",
@@ -7317,8 +7299,6 @@ test_client_side_encryption_install(TestSuite *suite)
73177299
NULL,
73187300
test_framework_skip_if_no_client_side_encryption,
73197301
test_framework_skip_if_max_wire_version_less_than_21,
7320-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7321-
test_framework_skip_if_serverless,
73227302
test_framework_skip_if_single);
73237303
TestSuite_AddFull(suite,
73247304
"/client_side_encryption/bypass_mongocryptd_shared_library",
@@ -7375,8 +7355,6 @@ test_client_side_encryption_install(TestSuite *suite)
73757355
(void *)rangeTypes[i] /* ctx */,
73767356
test_framework_skip_if_no_client_side_encryption,
73777357
test_framework_skip_if_max_wire_version_less_than_25, /* range queries require MongoDB 8.0+ */
7378-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7379-
test_framework_skip_if_serverless,
73807358
test_framework_skip_if_not_replset);
73817359
} else {
73827360
TestSuite_AddFull(
@@ -7387,8 +7365,6 @@ test_client_side_encryption_install(TestSuite *suite)
73877365
(void *)rangeTypes[i] /* ctx */,
73887366
test_framework_skip_if_no_client_side_encryption,
73897367
test_framework_skip_if_max_wire_version_less_than_25, /* range queries require MongoDB 8.0+ */
7390-
// Remove skip_if_serverless once DRIVERS-2589 is resolved.
7391-
test_framework_skip_if_serverless,
73927368
test_framework_skip_if_single);
73937369
}
73947370

src/libmongoc/tests/unified/runner.c

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ skipped_unified_test_t SKIPPED_TESTS[] = {
5353
{"snapshot-sessions", "Distinct operation with snapshot"},
5454
{"snapshot-sessions", "Mixed operation with snapshot"},
5555

56-
// CDRIVER-3886: serverless testing (schema version 1.4)
57-
{"poc-crud", SKIP_ALL_TESTS},
58-
{"db-aggregate", SKIP_ALL_TESTS},
59-
{"mongos-unpin", SKIP_ALL_TESTS},
60-
6156
// CDRIVER-2871: CMAP is not implemented
6257
{"assertNumberConnectionsCheckedOut", SKIP_ALL_TESTS},
6358
{"entity-client-cmap-events", SKIP_ALL_TESTS},
@@ -423,8 +418,6 @@ test_runner_new(void)
423418
test_runner->topology_type = get_topology_type(test_runner->internal_client);
424419
server_semver(test_runner->internal_client, &test_runner->server_version);
425420

426-
test_runner->is_serverless = test_framework_is_serverless();
427-
428421
/* Terminate any possible open transactions. */
429422
if (!test_runner_terminate_open_transactions(test_runner, &error)) {
430423
test_error("error terminating transactions: %s", error.message);
@@ -739,28 +732,7 @@ check_run_on_requirement(test_runner_t *test_runner,
739732
}
740733

741734
if (0 == strcmp(key, "serverless")) {
742-
const char *serverless_mode = bson_iter_utf8(&req_iter, NULL);
743-
744-
if (0 == strcmp(serverless_mode, "allow")) {
745-
continue;
746-
} else if (0 == strcmp(serverless_mode, "require")) {
747-
if (!test_runner->is_serverless) {
748-
*fail_reason = bson_strdup_printf("Not running in serverless mode");
749-
return false;
750-
}
751-
752-
continue;
753-
} else if (0 == strcmp(serverless_mode, "forbid")) {
754-
if (test_runner->is_serverless) {
755-
*fail_reason = bson_strdup_printf("Running in serverless mode");
756-
return false;
757-
}
758-
759-
continue;
760-
} else {
761-
test_error("Unexpected serverless mode: %s", serverless_mode);
762-
}
763-
735+
// Ignore deprecated serverless runOnRequirement. Serverless is not tested.
764736
continue;
765737
}
766738

src/libmongoc/tests/unified/runner.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ typedef struct {
3737
const char *topology_type;
3838
mongoc_array_t server_ids;
3939
bson_t *server_parameters;
40-
bool is_serverless;
4140
} test_runner_t;
4241

4342
typedef struct {

0 commit comments

Comments
 (0)