@@ -377,6 +377,33 @@ functions:
377
377
MONGODB_API_VERSION=${MONGODB_API_VERSION} \
378
378
.evergreen/run-tests.sh
379
379
380
+ " run serverless tests " :
381
+ - command : shell.exec
382
+ type : test
383
+ params :
384
+ shell : bash
385
+ working_dir : " src"
386
+ script : |
387
+ ${PREPARE_SHELL}
388
+ set +o xtrace
389
+ # Exported without xtrace to avoid leaking credentials
390
+ export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}"
391
+ export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}"
392
+
393
+ export MONGODB_URI="${MONGODB_URI}"
394
+ export SSL="${SSL}"
395
+ export SINGLE_MONGOS_LB_URI="${SINGLE_ATLASPROXY_SERVERLESS_URI}"
396
+ export MULTI_MONGOS_LB_URI="${MULTI_ATLASPROXY_SERVERLESS_URI}"
397
+ . .evergreen/generate-uri.sh
398
+
399
+ SNAPPY_COMPRESSION_ENABLED="true" \
400
+ ZLIB_COMPRESSION_ENABLED="true" \
401
+ ZSTD_COMPRESSION_ENABLED="true" \
402
+ SINGLE_THREAD=${SINGLE_THREAD} \
403
+ ASYNC_RUNTIME=${ASYNC_RUNTIME} \
404
+ MONGODB_API_VERSION=${MONGODB_API_VERSION} \
405
+ .evergreen/run-serverless-tests.sh
406
+
380
407
" run atlas tests " :
381
408
- command : shell.exec
382
409
type : test
@@ -881,6 +908,11 @@ tasks:
881
908
commands :
882
909
- func : " run connection string tests"
883
910
911
+ - name : " test-serverless"
912
+ tags : ["serverless"]
913
+ commands :
914
+ - func : " run serverless tests"
915
+
884
916
- name : " test-atlas-connectivity"
885
917
tags : ["atlas-connect"]
886
918
commands :
@@ -1387,6 +1419,51 @@ axes:
1387
1419
REQUIRE_API_VERSION : " 1"
1388
1420
MONGODB_API_VERSION : " 1"
1389
1421
1422
+ task_groups :
1423
+ - name : serverless_task_group
1424
+ setup_group_can_fail_task : true
1425
+ setup_group_timeout_secs : 1800 # 30 minutes
1426
+ setup_group :
1427
+ - func : " fetch source"
1428
+ - func : " prepare resources"
1429
+ - func : " windows fix"
1430
+ - func : " fix absolute paths"
1431
+ - func : " init test-results"
1432
+ - func : " make files executable"
1433
+ - func : " install dependencies"
1434
+ - command : shell.exec
1435
+ params :
1436
+ shell : " bash"
1437
+ script : |
1438
+ ${PREPARE_SHELL}
1439
+ set +o xtrace
1440
+ SERVERLESS_DRIVERS_GROUP=${SERVERLESS_DRIVERS_GROUP} \
1441
+ SERVERLESS_API_PUBLIC_KEY=${SERVERLESS_API_PUBLIC_KEY} \
1442
+ SERVERLESS_API_PRIVATE_KEY=${SERVERLESS_API_PRIVATE_KEY} \
1443
+ LOADBALANCED=ON \
1444
+ bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
1445
+ - command : expansions.update
1446
+ params :
1447
+ file : serverless-expansion.yml
1448
+ teardown_group :
1449
+ - command : shell.exec
1450
+ params :
1451
+ script : |
1452
+ ${PREPARE_SHELL}
1453
+ set +o xtrace
1454
+ SERVERLESS_DRIVERS_GROUP=${SERVERLESS_DRIVERS_GROUP} \
1455
+ SERVERLESS_API_PUBLIC_KEY=${SERVERLESS_API_PUBLIC_KEY} \
1456
+ SERVERLESS_API_PRIVATE_KEY=${SERVERLESS_API_PRIVATE_KEY} \
1457
+ SERVERLESS_INSTANCE_NAME=${SERVERLESS_INSTANCE_NAME} \
1458
+ bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
1459
+ - func : " upload test results"
1460
+ - func : " upload-mo-artifacts"
1461
+ - func : " cleanup"
1462
+
1463
+ tasks :
1464
+ - " .serverless"
1465
+
1466
+
1390
1467
buildvariants :
1391
1468
-
1392
1469
matrix_name : " tests"
@@ -1477,6 +1554,15 @@ buildvariants:
1477
1554
tasks :
1478
1555
- " test-plain-auth"
1479
1556
1557
+ - matrix_name : " serverless"
1558
+ matrix_spec :
1559
+ os :
1560
+ - ubuntu-18.04
1561
+ async-runtime : " *"
1562
+ display_name : " Serverless ${os} with ${async-runtime}"
1563
+ tasks :
1564
+ - " serverless_task_group"
1565
+
1480
1566
- matrix_name : " atlas-connect"
1481
1567
matrix_spec :
1482
1568
os :
0 commit comments