Skip to content

Commit

Permalink
chore: adds MongoDB 4.4 and latest tests for aws-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Reggi authored Aug 4, 2020
1 parent dd7973b commit edf429c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 26 deletions.
22 changes: 20 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,11 +1241,28 @@ tasks:
- func: run-ocsp-test
vars:
OCSP_TLS_SHOULD_SUCCEED: 0
- name: aws-auth-test
- name: aws-latest-auth-test
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
AUTH: auth
ORCHESTRATION_FILE: auth-aws.json
TOPOLOGY: server
- func: add aws auth variables to file
- func: run aws auth test with regular aws credentials
- func: run aws auth test with assume role credentials
- func: run aws auth test with aws EC2 credentials
- func: run aws auth test with aws credentials as environment variables
- func: run aws auth test with aws credentials and session token as environment variables
- func: run aws ECS auth test
- name: aws-4.4-auth-test
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.4'
AUTH: auth
ORCHESTRATION_FILE: auth-aws.json
TOPOLOGY: server
Expand Down Expand Up @@ -1564,4 +1581,5 @@ buildvariants:
expansions:
NODE_LTS_NAME: carbon
tasks:
- aws-auth-test
- aws-latest-auth-test
- aws-4.4-auth-test
57 changes: 33 additions & 24 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const yaml = require('js-yaml');

const LATEST_EFFECTIVE_VERSION = '5.0';
const MONGODB_VERSIONS = ['latest', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6'];
const AWS_AUTH_VERSIONS = ['latest', '4.4'];
const OCSP_VERSIONS = ['latest', '4.4'];
const NODE_VERSIONS = ['erbium', 'dubnium', 'carbon', 'boron', 'argon'];
const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'].concat([
Expand Down Expand Up @@ -233,27 +234,35 @@ OCSP_VERSIONS.forEach(VERSION => {
]);
})

TASKS.push({
name: 'aws-auth-test',
commands: [
{ func: 'install dependencies' },
{
func: 'bootstrap mongo-orchestration',
vars: {
AUTH: 'auth',
ORCHESTRATION_FILE: 'auth-aws.json',
TOPOLOGY: 'server'
}
},
{ func: 'add aws auth variables to file' },
{ func: 'run aws auth test with regular aws credentials' },
{ func: 'run aws auth test with assume role credentials' },
{ func: 'run aws auth test with aws EC2 credentials' },
{ func: 'run aws auth test with aws credentials as environment variables' },
{ func: 'run aws auth test with aws credentials and session token as environment variables' },
{ func: 'run aws ECS auth test' }
]
});
const AWS_AUTH_TASKS = [];

AWS_AUTH_VERSIONS.forEach(VERSION => {
const name = `aws-${VERSION}-auth-test`;
AWS_AUTH_TASKS.push(name);
TASKS.push({
name: name,
commands: [
{ func: 'install dependencies' },
{
func: 'bootstrap mongo-orchestration',
vars: {
VERSION: VERSION,
AUTH: 'auth',
ORCHESTRATION_FILE: 'auth-aws.json',
TOPOLOGY: 'server'
}
},
{ func: 'add aws auth variables to file' },
{ func: 'run aws auth test with regular aws credentials' },
{ func: 'run aws auth test with assume role credentials' },
{ func: 'run aws auth test with aws EC2 credentials' },
{ func: 'run aws auth test with aws credentials as environment variables' },
{ func: 'run aws auth test with aws credentials and session token as environment variables' },
{ func: 'run aws ECS auth test' }
]
});
})


const BUILD_VARIANTS = [];

Expand All @@ -268,6 +277,8 @@ const getTaskList = (() => {

const ret = TASKS.filter(task => {
const tasksWithVars = task.commands.filter(task => !!task.vars);
if (task.name.match(/^aws/)) return false;

if (!tasksWithVars.length) {
return true;
}
Expand Down Expand Up @@ -343,9 +354,7 @@ BUILD_VARIANTS.push({
expansions: {
NODE_LTS_NAME: 'carbon'
},
tasks: [
'aws-auth-test'
]
tasks: AWS_AUTH_TASKS
});

const fileData = yaml.safeLoad(fs.readFileSync(`${__dirname}/config.yml.in`, 'utf8'));
Expand Down

0 comments on commit edf429c

Please sign in to comment.