Skip to content

Commit

Permalink
Merge pull request #1 from sinstein/track_travis_sessions
Browse files Browse the repository at this point in the history
Suffix username to mark BrowserStack sessions run via Travis
  • Loading branch information
vedharish authored May 2, 2017
2 parents b7ac3e7 + fb0431c commit b661f9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/travis/build/addons/browserstack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def before_before_script
sh.echo 'Starting BrowserStack Local', ansi: :yellow
sh.cmd "#{build_start_command(browserstack_key)}"
browserstack_user = username.to_s
sh.export ENV_USER, browserstack_user, echo: true unless browserstack_user.empty?
sh.export ENV_USER, browserstack_user + "-travis", echo: true unless browserstack_user.empty?
sh.export ENV_KEY, browserstack_key, echo: false
sh.export ENV_LOCAL, 'true', echo: true
end
Expand Down
2 changes: 1 addition & 1 deletion spec/build/addons/browserstack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
let(:config) { { os: 'linux', username: 'user1', access_key: 'accesskey' } }

it_behaves_like 'installs browserstack local'
it { should include_sexp [:export, ["#{described_class::ENV_USER}", config[:username]], {:echo => true}] }
it { should include_sexp [:export, ["#{described_class::ENV_USER}", config[:username] + "-travis"], {:echo => true}] }
it { should include_sexp [:cmd, "#{described_class::BROWSERSTACK_HOME}/BrowserStackLocal -d start #{config[:access_key]} -localIdentifier $BROWSERSTACK_LOCAL_IDENTIFIER"] }
end

Expand Down

0 comments on commit b661f9a

Please sign in to comment.