@@ -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
@@ -1523,6 +1550,140 @@ tasks:
15231550 vars :
15241551 target : test:integration -ssl=true -topology=replSet ${testArgs}
15251552
1553+ - name : integration-4.4-sharded
1554+ tags : ["4.4", "sharded"]
1555+ commands :
1556+ - func : " fetch source"
1557+ - command : expansions.update
1558+ - func : " download mongod and shell"
1559+ vars :
1560+ mongo_version : " 4.4"
1561+ - func : " create sharded cluster"
1562+ - func : " run make target"
1563+ vars :
1564+ target : build
1565+ - func : " run make target"
1566+ vars :
1567+ target : test:sharded-integration ${testArgs}
1568+
1569+ - name : integration-5.0-sharded
1570+ tags : ["5.0", "sharded"]
1571+ commands :
1572+ - func : " fetch source"
1573+ - command : expansions.update
1574+ - func : " download mongod and shell"
1575+ vars :
1576+ mongo_version : " 5.0"
1577+ - func : " create sharded cluster"
1578+ - func : " run make target"
1579+ vars :
1580+ target : build
1581+ - func : " run make target"
1582+ vars :
1583+ target : test:sharded-integration ${testArgs}
1584+
1585+ - name : integration-6.0-sharded
1586+ tags : ["6.0", "sharded"]
1587+ commands :
1588+ - func : " fetch source"
1589+ - command : expansions.update
1590+ - func : " download mongod and shell"
1591+ vars :
1592+ mongo_version : " 6.0"
1593+ - func : " create sharded cluster"
1594+ - func : " run make target"
1595+ vars :
1596+ target : build
1597+ - func : " run make target"
1598+ vars :
1599+ target : test:sharded-integration ${testArgs}
1600+
1601+ - name : integration-7.0-sharded
1602+ tags : ["7.0", "sharded"]
1603+ commands :
1604+ - func : " fetch source"
1605+ - command : expansions.update
1606+ - func : " download mongod and shell"
1607+ vars :
1608+ mongo_version : " 7.0"
1609+ - func : " create sharded cluster"
1610+ - func : " run make target"
1611+ vars :
1612+ target : build
1613+ - func : " run make target"
1614+ vars :
1615+ target : test:sharded-integration ${testArgs}
1616+
1617+ - name : integration-8.0-sharded
1618+ tags : ["8.0", "sharded"]
1619+ commands :
1620+ - func : " fetch source"
1621+ - command : expansions.update
1622+ - func : " download mongod and shell"
1623+ vars :
1624+ mongo_version : " 8.0"
1625+ - func : " create sharded cluster"
1626+ - func : " run make target"
1627+ vars :
1628+ target : build
1629+ - func : " run make target"
1630+ vars :
1631+ target : test:sharded-integration ${testArgs}
1632+
1633+ - name : integration-8.1-sharded
1634+ tags : ["8.1", "sharded"]
1635+ commands :
1636+ - func : " fetch source"
1637+ - command : expansions.update
1638+ - func : " download mongod and shell"
1639+ vars :
1640+ mongo_version : " 8.1.0"
1641+ - func : " create sharded cluster"
1642+ vars :
1643+ load_libs_version : " 8.1"
1644+ - func : " run make target"
1645+ vars :
1646+ target : build
1647+ - func : " run make target"
1648+ vars :
1649+ target : test:sharded-integration ${testArgs}
1650+
1651+ - name : integration-8.2-sharded
1652+ tags : ["8.2", "sharded"]
1653+ commands :
1654+ - func : " fetch source"
1655+ - command : expansions.update
1656+ - func : " download mongod and shell"
1657+ vars :
1658+ mongo_version : " 8.2.0"
1659+ - func : " create sharded cluster"
1660+ vars :
1661+ load_libs_version : " 8.2"
1662+ - func : " run make target"
1663+ vars :
1664+ target : build
1665+ - func : " run make target"
1666+ vars :
1667+ target : test:sharded-integration ${testArgs}
1668+
1669+ - name : integration-latest-sharded
1670+ tags : ["latest", "sharded"]
1671+ commands :
1672+ - func : " fetch source"
1673+ - command : expansions.update
1674+ - func : " download mongod and shell"
1675+ vars :
1676+ mongo_version : " latest"
1677+ - func : " create sharded cluster"
1678+ vars :
1679+ load_libs_version : *max_server_version
1680+ - func : " run make target"
1681+ vars :
1682+ target : build
1683+ - func : " run make target"
1684+ vars :
1685+ target : test:sharded-integration ${testArgs}
1686+
15261687 - name : aws-auth-latest
15271688 tags : ["latest", "aws-auth"]
15281689 commands :
0 commit comments