Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Write tests for Heroku CI
Browse files Browse the repository at this point in the history
  • Loading branch information
meganemura committed Oct 8, 2018
1 parent dbae219 commit 3690fcf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_codecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def teardown
ENV['GIT_BRANCH'] = nil
ENV['GIT_COMMIT'] = nil
ENV['GITLAB_CI'] = nil
ENV['HEROKU_TEST_RUN_ID'] = nil
ENV['HEROKU_TEST_RUN_BRANCH'] = nil
ENV['HEROKU_TEST_RUN_COMMIT_VERSION'] = nil
ENV['JENKINS_URL'] = nil
ENV['MAGNUM'] = nil
ENV['PULL_REQUEST'] = nil
Expand Down Expand Up @@ -394,6 +397,19 @@ def test_azure_pipelines
assert_equal("owner/repo", result['params'][:slug])
assert_equal('f881216b-b5c0-4eb1-8f21-b51887d1d506', result['params']['token'])
end
def test_heroku
ENV['HEROKU_TEST_RUN_ID'] = "454f5dc9-afa4-433f-bb28-84678a00fd98"
ENV['HEROKU_TEST_RUN_BRANCH'] = "master"
ENV['HEROKU_TEST_RUN_COMMIT_VERSION'] = "743b04806ea677403aa2ff26c6bdeb85005de658"
ENV['CODECOV_TOKEN'] = 'f881216b-b5c0-4eb1-8f21-b51887d1d506'

result = upload
assert_equal("heroku", result['params'][:service])
assert_equal("743b04806ea677403aa2ff26c6bdeb85005de658", result['params'][:commit])
assert_equal("454f5dc9-afa4-433f-bb28-84678a00fd98", result['params'][:build])
assert_equal("master", result['params'][:branch])
assert_equal('f881216b-b5c0-4eb1-8f21-b51887d1d506', result['params']['token'])
end

def test_filenames_are_shortened_correctly
formatter = SimpleCov::Formatter::Codecov.new
Expand Down

0 comments on commit 3690fcf

Please sign in to comment.