@@ -461,6 +461,33 @@ 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+ mkdir -p /data/db/
475+ # use jsconfig.json to set baseUrl to find libs
476+ mv test/shell_common/jsconfig.json ./
477+ if [ -n "${load_libs_version}" ]; then
478+ IMPORT_LOAD_LIBS="await import(\"../shell_common/libs/load_libs-${load_libs_version}.js\");"
479+ fi
480+ PATH=./bin:$PATH ./bin/mongo --port ${mongod_port} --nodb --eval "$IMPORT_LOAD_LIBS; var st = new ShardingTest({name: \"tools_sharded_cluster\", shards: 1, mongos: [{port: ${mongod_port}}], other: {rsOptions: {}, configOptions: {}}}); while(true){sleep(1000);}"
481+
482+ - command : shell.exec
483+ params :
484+ working_dir : src/github.com/mongodb/mongo-tools
485+ script : |
486+ set -x
487+ set -v
488+ set -e
489+ ./bin/mongo --port ${mongod_port} --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:${mongod_port}"); return true} catch(e){return false}}, "timed out connection")'
490+
464491 " add-aws-auth-variables-to-file " :
465492 - command : shell.exec
466493 type : test
@@ -1624,6 +1651,140 @@ tasks:
16241651 vars :
16251652 target : test:integration -ssl=true -topology=replSet ${testArgs}
16261653
1654+ - name : integration-4.4-sharded
1655+ tags : ["4.4", "sharded"]
1656+ commands :
1657+ - func : " fetch source"
1658+ - command : expansions.update
1659+ - func : " download mongod and shell"
1660+ vars :
1661+ mongo_version : " 4.4"
1662+ - func : " create sharded cluster"
1663+ - func : " run make target"
1664+ vars :
1665+ target : build
1666+ - func : " run make target"
1667+ vars :
1668+ target : test:sharded-integration ${testArgs}
1669+
1670+ - name : integration-5.0-sharded
1671+ tags : ["5.0", "sharded"]
1672+ commands :
1673+ - func : " fetch source"
1674+ - command : expansions.update
1675+ - func : " download mongod and shell"
1676+ vars :
1677+ mongo_version : " 5.0"
1678+ - func : " create sharded cluster"
1679+ - func : " run make target"
1680+ vars :
1681+ target : build
1682+ - func : " run make target"
1683+ vars :
1684+ target : test:sharded-integration ${testArgs}
1685+
1686+ - name : integration-6.0-sharded
1687+ tags : ["6.0", "sharded"]
1688+ commands :
1689+ - func : " fetch source"
1690+ - command : expansions.update
1691+ - func : " download mongod and shell"
1692+ vars :
1693+ mongo_version : " 6.0"
1694+ - func : " create sharded cluster"
1695+ - func : " run make target"
1696+ vars :
1697+ target : build
1698+ - func : " run make target"
1699+ vars :
1700+ target : test:sharded-integration ${testArgs}
1701+
1702+ - name : integration-7.0-sharded
1703+ tags : ["7.0", "sharded"]
1704+ commands :
1705+ - func : " fetch source"
1706+ - command : expansions.update
1707+ - func : " download mongod and shell"
1708+ vars :
1709+ mongo_version : " 7.0"
1710+ - func : " create sharded cluster"
1711+ - func : " run make target"
1712+ vars :
1713+ target : build
1714+ - func : " run make target"
1715+ vars :
1716+ target : test:sharded-integration ${testArgs}
1717+
1718+ - name : integration-8.0-sharded
1719+ tags : ["8.0", "sharded"]
1720+ commands :
1721+ - func : " fetch source"
1722+ - command : expansions.update
1723+ - func : " download mongod and shell"
1724+ vars :
1725+ mongo_version : " 8.0"
1726+ - func : " create sharded cluster"
1727+ - func : " run make target"
1728+ vars :
1729+ target : build
1730+ - func : " run make target"
1731+ vars :
1732+ target : test:sharded-integration ${testArgs}
1733+
1734+ - name : integration-8.1-sharded
1735+ tags : ["8.1", "sharded"]
1736+ commands :
1737+ - func : " fetch source"
1738+ - command : expansions.update
1739+ - func : " download mongod and shell"
1740+ vars :
1741+ mongo_version : " 8.1.0"
1742+ - func : " create sharded cluster"
1743+ vars :
1744+ load_libs_version : " 8.1"
1745+ - func : " run make target"
1746+ vars :
1747+ target : build
1748+ - func : " run make target"
1749+ vars :
1750+ target : test:sharded-integration ${testArgs}
1751+
1752+ - name : integration-8.2-sharded
1753+ tags : ["8.2", "sharded"]
1754+ commands :
1755+ - func : " fetch source"
1756+ - command : expansions.update
1757+ - func : " download mongod and shell"
1758+ vars :
1759+ mongo_version : " 8.2.0"
1760+ - func : " create sharded cluster"
1761+ vars :
1762+ load_libs_version : " 8.2"
1763+ - func : " run make target"
1764+ vars :
1765+ target : build
1766+ - func : " run make target"
1767+ vars :
1768+ target : test:sharded-integration ${testArgs}
1769+
1770+ - name : integration-latest-sharded
1771+ tags : ["latest", "sharded"]
1772+ commands :
1773+ - func : " fetch source"
1774+ - command : expansions.update
1775+ - func : " download mongod and shell"
1776+ vars :
1777+ mongo_version : " latest"
1778+ - func : " create sharded cluster"
1779+ vars :
1780+ load_libs_version : *max_server_version
1781+ - func : " run make target"
1782+ vars :
1783+ target : build
1784+ - func : " run make target"
1785+ vars :
1786+ target : test:sharded-integration ${testArgs}
1787+
16271788 - name : aws-auth-latest
16281789 tags : ["latest", "aws-auth"]
16291790 commands :
0 commit comments