Skip to content

Commit edf429c

Browse files
author
Thomas Reggi
authored
chore: adds MongoDB 4.4 and latest tests for aws-auth
NODE-2634
1 parent dd7973b commit edf429c

File tree

2 files changed

+53
-26
lines changed

2 files changed

+53
-26
lines changed

.evergreen/config.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -1241,11 +1241,28 @@ tasks:
12411241
- func: run-ocsp-test
12421242
vars:
12431243
OCSP_TLS_SHOULD_SUCCEED: 0
1244-
- name: aws-auth-test
1244+
- name: aws-latest-auth-test
12451245
commands:
12461246
- func: install dependencies
12471247
- func: bootstrap mongo-orchestration
12481248
vars:
1249+
VERSION: latest
1250+
AUTH: auth
1251+
ORCHESTRATION_FILE: auth-aws.json
1252+
TOPOLOGY: server
1253+
- func: add aws auth variables to file
1254+
- func: run aws auth test with regular aws credentials
1255+
- func: run aws auth test with assume role credentials
1256+
- func: run aws auth test with aws EC2 credentials
1257+
- func: run aws auth test with aws credentials as environment variables
1258+
- func: run aws auth test with aws credentials and session token as environment variables
1259+
- func: run aws ECS auth test
1260+
- name: aws-4.4-auth-test
1261+
commands:
1262+
- func: install dependencies
1263+
- func: bootstrap mongo-orchestration
1264+
vars:
1265+
VERSION: '4.4'
12491266
AUTH: auth
12501267
ORCHESTRATION_FILE: auth-aws.json
12511268
TOPOLOGY: server
@@ -1564,4 +1581,5 @@ buildvariants:
15641581
expansions:
15651582
NODE_LTS_NAME: carbon
15661583
tasks:
1567-
- aws-auth-test
1584+
- aws-latest-auth-test
1585+
- aws-4.4-auth-test

.evergreen/generate_evergreen_tasks.js

+33-24
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const yaml = require('js-yaml');
66

77
const LATEST_EFFECTIVE_VERSION = '5.0';
88
const MONGODB_VERSIONS = ['latest', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6'];
9+
const AWS_AUTH_VERSIONS = ['latest', '4.4'];
910
const OCSP_VERSIONS = ['latest', '4.4'];
1011
const NODE_VERSIONS = ['erbium', 'dubnium', 'carbon', 'boron', 'argon'];
1112
const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'].concat([
@@ -233,27 +234,35 @@ OCSP_VERSIONS.forEach(VERSION => {
233234
]);
234235
})
235236

236-
TASKS.push({
237-
name: 'aws-auth-test',
238-
commands: [
239-
{ func: 'install dependencies' },
240-
{
241-
func: 'bootstrap mongo-orchestration',
242-
vars: {
243-
AUTH: 'auth',
244-
ORCHESTRATION_FILE: 'auth-aws.json',
245-
TOPOLOGY: 'server'
246-
}
247-
},
248-
{ func: 'add aws auth variables to file' },
249-
{ func: 'run aws auth test with regular aws credentials' },
250-
{ func: 'run aws auth test with assume role credentials' },
251-
{ func: 'run aws auth test with aws EC2 credentials' },
252-
{ func: 'run aws auth test with aws credentials as environment variables' },
253-
{ func: 'run aws auth test with aws credentials and session token as environment variables' },
254-
{ func: 'run aws ECS auth test' }
255-
]
256-
});
237+
const AWS_AUTH_TASKS = [];
238+
239+
AWS_AUTH_VERSIONS.forEach(VERSION => {
240+
const name = `aws-${VERSION}-auth-test`;
241+
AWS_AUTH_TASKS.push(name);
242+
TASKS.push({
243+
name: name,
244+
commands: [
245+
{ func: 'install dependencies' },
246+
{
247+
func: 'bootstrap mongo-orchestration',
248+
vars: {
249+
VERSION: VERSION,
250+
AUTH: 'auth',
251+
ORCHESTRATION_FILE: 'auth-aws.json',
252+
TOPOLOGY: 'server'
253+
}
254+
},
255+
{ func: 'add aws auth variables to file' },
256+
{ func: 'run aws auth test with regular aws credentials' },
257+
{ func: 'run aws auth test with assume role credentials' },
258+
{ func: 'run aws auth test with aws EC2 credentials' },
259+
{ func: 'run aws auth test with aws credentials as environment variables' },
260+
{ func: 'run aws auth test with aws credentials and session token as environment variables' },
261+
{ func: 'run aws ECS auth test' }
262+
]
263+
});
264+
})
265+
257266

258267
const BUILD_VARIANTS = [];
259268

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

269278
const ret = TASKS.filter(task => {
270279
const tasksWithVars = task.commands.filter(task => !!task.vars);
280+
if (task.name.match(/^aws/)) return false;
281+
271282
if (!tasksWithVars.length) {
272283
return true;
273284
}
@@ -343,9 +354,7 @@ BUILD_VARIANTS.push({
343354
expansions: {
344355
NODE_LTS_NAME: 'carbon'
345356
},
346-
tasks: [
347-
'aws-auth-test'
348-
]
357+
tasks: AWS_AUTH_TASKS
349358
});
350359

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

0 commit comments

Comments
 (0)