@@ -461,6 +461,45 @@ functions:
461461 fi;
462462 ./bin/mongo $MONGO_ARGS --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:${mongod_port}"); return true} catch(e){return false}}, "timed out connection")'
463463
464+ " create sharded cluster " :
465+ - command : shell.exec
466+ params :
467+ working_dir : src/github.com/mongodb/mongo-tools
468+ background : true
469+ script : |
470+ set -x
471+ set -v
472+ set -e
473+ echo "starting sharded cluster"
474+ MONGO_ARGS="${mongo_args}"
475+ NODE_OPTIONS=""
476+ mkdir -p /data/db/
477+ if [ "${USE_TLS}" = "true" ]; then
478+ NODE_OPTIONS="${replsettest_tls_config}"
479+ MONGO_ARGS="${mongo_args_tls}"
480+ elif [ "${USE_SSL}" = "true" ]; then
481+ NODE_OPTIONS="${replsettest_ssl_config}"
482+ fi
483+ # use jsconfig.json to set baseUrl to find libs
484+ mv test/shell_common/jsconfig.json ./
485+ if [ -n "${load_libs_version}" ]; then
486+ IMPORT_LOAD_LIBS="await import(\"../shell_common/libs/load_libs-${load_libs_version}.js\");"
487+ fi
488+ PATH=./bin:$PATH ./bin/mongo $MONGO_ARGS --nodb --eval "$IMPORT_LOAD_LIBS; var st = new ShardingTest({name: \"tools_sharded_cluster\", shards: 1, mongos: [{port: ${mongod_port}, $NODE_OPTIONS}], other: {rsOptions: {$NODE_OPTIONS}, configOptions: {$NODE_OPTIONS}}}); while(true){sleep(1000);}"
489+
490+ - command : shell.exec
491+ params :
492+ working_dir : src/github.com/mongodb/mongo-tools
493+ script : |
494+ set -x
495+ set -v
496+ set -e
497+ MONGO_ARGS="${mongo_args}"
498+ if [ "${USE_TLS}" = "true" ]; then
499+ MONGO_ARGS="${mongo_args_tls}"
500+ fi
501+ ./bin/mongo $MONGO_ARGS --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:${mongod_port}"); return true} catch(e){return false}}, "timed out connection")'
502+
464503 " add-aws-auth-variables-to-file " :
465504 - command : shell.exec
466505 type : test
@@ -1523,6 +1562,153 @@ tasks:
15231562 vars :
15241563 target : test:integration -ssl=true -topology=replSet ${testArgs}
15251564
1565+ - name : integration-4.4-sharded
1566+ tags : ["4.4", "sharded"]
1567+ commands :
1568+ - func : " fetch source"
1569+ - command : expansions.update
1570+ - func : " download mongod and shell"
1571+ vars :
1572+ mongo_version : " 4.4"
1573+ - func : " create sharded cluster"
1574+ vars :
1575+ USE_TLS : " true"
1576+ - func : " run make target"
1577+ vars :
1578+ target : build
1579+ - func : " run make target"
1580+ vars :
1581+ target : test:sharded-integration -ssl=true ${testArgs}
1582+
1583+ - name : integration-5.0-sharded
1584+ tags : ["5.0", "sharded"]
1585+ commands :
1586+ - func : " fetch source"
1587+ - command : expansions.update
1588+ - func : " download mongod and shell"
1589+ vars :
1590+ mongo_version : " 5.0"
1591+ - func : " create sharded cluster"
1592+ vars :
1593+ USE_TLS : " true"
1594+ - func : " run make target"
1595+ vars :
1596+ target : build
1597+ - func : " run make target"
1598+ vars :
1599+ target : test:sharded-integration -ssl=true ${testArgs}
1600+
1601+ - name : integration-6.0-sharded
1602+ tags : ["6.0", "sharded"]
1603+ commands :
1604+ - func : " fetch source"
1605+ - command : expansions.update
1606+ - func : " download mongod and shell"
1607+ vars :
1608+ mongo_version : " 6.0"
1609+ - func : " create sharded cluster"
1610+ vars :
1611+ USE_TLS : " true"
1612+ - func : " run make target"
1613+ vars :
1614+ target : build
1615+ - func : " run make target"
1616+ vars :
1617+ target : test:sharded-integration -ssl=true ${testArgs}
1618+
1619+ - name : integration-7.0-sharded
1620+ tags : ["7.0", "sharded"]
1621+ commands :
1622+ - func : " fetch source"
1623+ - command : expansions.update
1624+ - func : " download mongod and shell"
1625+ vars :
1626+ mongo_version : " 7.0"
1627+ - func : " create sharded cluster"
1628+ vars :
1629+ USE_TLS : " true"
1630+ - func : " run make target"
1631+ vars :
1632+ target : build
1633+ - func : " run make target"
1634+ vars :
1635+ target : test:sharded-integration -ssl=true ${testArgs}
1636+
1637+ - name : integration-8.0-sharded
1638+ tags : ["8.0", "sharded"]
1639+ commands :
1640+ - func : " fetch source"
1641+ - command : expansions.update
1642+ - func : " download mongod and shell"
1643+ vars :
1644+ mongo_version : " 8.0"
1645+ - func : " create sharded cluster"
1646+ vars :
1647+ USE_TLS : " true"
1648+ - func : " run make target"
1649+ vars :
1650+ target : build
1651+ - func : " run make target"
1652+ vars :
1653+ target : test:sharded-integration -ssl=true ${testArgs}
1654+
1655+ - name : integration-8.1-sharded
1656+ tags : ["8.1", "sharded"]
1657+ commands :
1658+ - func : " fetch source"
1659+ - command : expansions.update
1660+ - func : " download mongod and shell"
1661+ vars :
1662+ mongo_version : " 8.1.0"
1663+ - func : " create sharded cluster"
1664+ vars :
1665+ USE_TLS : " true"
1666+ load_libs_version : " 8.1"
1667+ - func : " run make target"
1668+ vars :
1669+ target : build
1670+ - func : " run make target"
1671+ vars :
1672+ target : test:sharded-integration -ssl=true ${testArgs}
1673+
1674+ - name : integration-8.2-sharded
1675+ tags : ["8.2", "sharded"]
1676+ commands :
1677+ - func : " fetch source"
1678+ - command : expansions.update
1679+ - func : " download mongod and shell"
1680+ vars :
1681+ mongo_version : " 8.2.0"
1682+ - func : " create sharded cluster"
1683+ vars :
1684+ USE_TLS : " true"
1685+ load_libs_version : " 8.2"
1686+ - func : " run make target"
1687+ vars :
1688+ target : build
1689+ - func : " run make target"
1690+ vars :
1691+ target : test:sharded-integration -ssl=true ${testArgs}
1692+
1693+ - name : integration-latest-sharded
1694+ tags : ["latest", "sharded"]
1695+ commands :
1696+ - func : " fetch source"
1697+ - command : expansions.update
1698+ - func : " download mongod and shell"
1699+ vars :
1700+ mongo_version : " latest"
1701+ - func : " create sharded cluster"
1702+ vars :
1703+ USE_TLS : " true"
1704+ load_libs_version : *max_server_version
1705+ - func : " run make target"
1706+ vars :
1707+ target : build
1708+ - func : " run make target"
1709+ vars :
1710+ target : test:sharded-integration -ssl=true ${testArgs}
1711+
15261712 - name : aws-auth-latest
15271713 tags : ["latest", "aws-auth"]
15281714 commands :
0 commit comments