Permalink
Browse files

tag test with the environment; drop the redundant persona which was u…

…seful in shared environment
  • Loading branch information...
1 parent 61c3337 commit 0f8f11561c266a1542d776cd63ecbaaeee6c8af4 @jrgm jrgm committed Nov 10, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 automation-tests/lib/test-setup.js
View
12 automation-tests/lib/test-setup.js
@@ -161,21 +161,19 @@ function setSessionOpts(opts) {
sessionOpts.proxy = { proxyType: 'direct' };
}
- // Ensure there is a tag for 'persona'
- sessionOpts.tags = sessionOpts.tags || [];
- if (sessionOpts.tags.indexOf('persona') === -1) {
- sessionOpts.tags.push('persona');
- }
-
// Ensure a test name for saucelabs
if (!sessionOpts.name) sessionOpts.name = createTestName();
// Optionally add tag names from the environment
+ sessionOpts.tags = sessionOpts.tags || [];
if (process.env.PERSONA_SAUCE_CUSTOM_TAGS) {
var customTags = process.env.PERSONA_SAUCE_CUSTOM_TAGS.split(/[\s,]/);
- Array.prototype.push.apply(sessionOpts.tags, customTags);
+ sessionOpts.tags = sessionOpts.tags.concat(customTags);
}
+ sessionOpts.tags.push('env-' + (process.env.PERSONA_ENV || 'dev'));
+ sessionOpts.tags = _.uniq(sessionOpts.tags);
+
testSetup.sessionOpts = sessionOpts;
}

0 comments on commit 0f8f115

Please sign in to comment.