-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from criteo-forks/configure-env
Add support for custom environment in Mesos term
- Loading branch information
Showing
7 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Bluebird = require('bluebird'); | ||
import AppsHelpers = require('./apps_helpers'); | ||
import helpers = require('./helpers'); | ||
import webdriver = require('selenium-webdriver'); | ||
|
||
|
||
describe('custom environment variables', function() { | ||
const user = 'john'; | ||
const port = 3000; | ||
const appName = 'app1'; | ||
|
||
describe('environment variable TOTO=tata is configured', function() { | ||
it('environment variable is set', function() { | ||
this.timeout(5000); | ||
const instanceId = this.mesosTaskIds[appName]; | ||
return helpers.withChrome(function(driver) { | ||
return Bluebird.resolve(driver.get(`http://${user}:password@localhost:${port}/login/${instanceId}`)) | ||
.then(function() { | ||
return AppsHelpers.testAnswerToCommand(driver, 'echo $TOTO', 'tata'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('environment variable Bad=var is configured', function() { | ||
it('environment variable is not set', function() { | ||
this.timeout(5000); | ||
const instanceId = this.mesosTaskIds[appName]; | ||
return helpers.withChrome(function(driver) { | ||
return Bluebird.resolve(driver.get(`http://${user}:password@localhost:${port}/login/${instanceId}`)) | ||
.then(function() { | ||
return AppsHelpers.testAnswerToCommand(driver, 'echo ${Bad-not set}', 'not set'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |