Changed config tests to use higher precedence ENV configuration names for USERNAME and ACCESS_KEY.

Included SAUCE_USER_NAME in Config::ENVIRONMENT_VARIABLES to ensure it
gets reset after tests.
This commit is contained in:
Dylan Lacey 2013-02-26 19:25:53 -08:00
parent a21698fc18
commit d6765b1d03
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ module Sauce
ENVIRONMENT_VARIABLES = %w{SAUCE_HOST SAUCE_PORT SAUCE_BROWSER_URL SAUCE_USERNAME
SAUCE_ACCESS_KEY SAUCE_OS SAUCE_BROWSER SAUCE_BROWSER_VERSION SAUCE_JOB_NAME
SAUCE_FIREFOX_PROFILE_URL SAUCE_USER_EXTENSIONS_URL
SAUCE_ONDEMAND_BROWSERS SAUCE_USERNAME SAUCE_API_KEY}
SAUCE_ONDEMAND_BROWSERS SAUCE_USER_NAME SAUCE_API_KEY}
PLATFORMS = {
"Windows 2003" => "WINDOWS",

View File

@ -104,12 +104,12 @@ describe Sauce::Config do
end
it 'should create a browser string from the environment set by the jenkins plugin' do
ENV['SAUCE_USER_NAME'] = 'test_user'
ENV['SAUCE_API_KEY'] = 'test_access'
ENV['SAUCE_USERNAME'] = 'test_user'
ENV['SAUCE_ACCESS_KEY'] = 'test_access'
ENV['SAUCE_OS'] = 'Linux'
ENV['SAUCE_BROWSER'] = 'firefox'
ENV['SAUCE_BROWSER_VERSION'] = '3.'
ENV['JOB_NAME'] = 'Named Ruby Job'
ENV['SAUCE_JOB_NAME'] = 'Named Ruby Job'
config = Sauce::Config.new
browser_data = JSON.parse(config.to_browser_string)