New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test runner: Include link to submitted test in printed message on report submission #1996

Merged
merged 4 commits into from Feb 28, 2018

Conversation

Projects
None yet
3 participants
@megies
Member

megies commented Nov 12, 2017

tests.obspy.org now sends a json response with a link to the submitted test report, so we should include it in the printed message by obspy-runtests.

see obspy/reporter#19

@megies megies added this to the 1.1.1 milestone Nov 11, 2017

@megies megies requested a review from barsch Nov 12, 2017

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Nov 12, 2017

Member
$ obspy-runtests io.ah
Running /home/megies/git/obspy-master/obspy/scripts/runtests.py, ObsPy version '1.1.0.post0+3.g49d9d03cd4.dirty.obspy.master'
.....
----------------------------------------------------------------------
Ran 5 tests in 0.188s

OK
Do you want to report this to tests.obspy.org? [n]: y

Test report has been sent to tests.obspy.org: http://tests.obspy.org/90395/ Thank you!
Member

megies commented Nov 12, 2017

$ obspy-runtests io.ah
Running /home/megies/git/obspy-master/obspy/scripts/runtests.py, ObsPy version '1.1.0.post0+3.g49d9d03cd4.dirty.obspy.master'
.....
----------------------------------------------------------------------
Ran 5 tests in 0.188s

OK
Do you want to report this to tests.obspy.org? [n]: y

Test report has been sent to tests.obspy.org: http://tests.obspy.org/90395/ Thank you!
@barsch

barsch approved these changes Nov 12, 2017

@krischer

This comment has been minimized.

Show comment
Hide comment
@krischer

krischer Nov 12, 2017

Member

How about:

Your test results have been reported and are available at: http://tests.obspy.org/90395/

Member

krischer commented Nov 12, 2017

How about:

Your test results have been reported and are available at: http://tests.obspy.org/90395/

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Nov 12, 2017

Member

Your tests results have been reported and are available at: http://tests.obspy.org/90395/

Can do. I just thought I'd leave the original server url in there just in case we followed a redirect in the process

Member

megies commented Nov 12, 2017

Your tests results have been reported and are available at: http://tests.obspy.org/90395/

Can do. I just thought I'd leave the original server url in there just in case we followed a redirect in the process

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Nov 12, 2017

Member
$ obspy-runtests io.ah
Running /home/megies/git/obspy-master/obspy/scripts/runtests.py, ObsPy version '1.1.0.post0+16.g16687a74fa.dirty.obspy.parse.test.report.url'
.....
----------------------------------------------------------------------
Ran 5 tests in 0.260s

OK
Do you want to report this to tests.obspy.org? [n]: y

Your test results have been reported and are available at: http://tests.obspy.org/90407/
Thank you!
Member

megies commented Nov 12, 2017

$ obspy-runtests io.ah
Running /home/megies/git/obspy-master/obspy/scripts/runtests.py, ObsPy version '1.1.0.post0+16.g16687a74fa.dirty.obspy.parse.test.report.url'
.....
----------------------------------------------------------------------
Ran 5 tests in 0.260s

OK
Do you want to report this to tests.obspy.org? [n]: y

Your test results have been reported and are available at: http://tests.obspy.org/90407/
Thank you!
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Nov 12, 2017

Member
https://travis-ci.org/obspy/obspy/jobs/301047404#L1813
Ran 1707 tests in 442.495s

OK

/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py:304: DeprecationWarning: unicode for buf is no longer accepted, use bytes

  return self.connection.send(data)

Your test results have been reported and are available at: http://tests.obspy.org/90417/

Thank you!
Member

megies commented Nov 12, 2017

https://travis-ci.org/obspy/obspy/jobs/301047404#L1813
Ran 1707 tests in 442.495s

OK

/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py:304: DeprecationWarning: unicode for buf is no longer accepted, use bytes

  return self.connection.send(data)

Your test results have been reported and are available at: http://tests.obspy.org/90417/

Thank you!
@krischer

This comment has been minimized.

Show comment
Hide comment
@krischer

krischer Nov 12, 2017

Member

Message looks nicer to me now to be honest. I don't think we have to worry about the reconnect. WIthout looking at the code: How about just trying to .encode() whatever gets send to the reporter? If its deeper in the code, I guess we can just ignore it for now.

Member

krischer commented Nov 12, 2017

Message looks nicer to me now to be honest. I don't think we have to worry about the reconnect. WIthout looking at the code: How about just trying to .encode() whatever gets send to the reporter? If its deeper in the code, I guess we can just ignore it for now.

megies added some commits Nov 12, 2017

obspy-runtests: parse url to report from server response
also switch to using requests, redirect handling is done automatically
by requests, so that part is not needed anymore see
https://stackoverflow.com/a/22150088/3419472
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Dec 11, 2017

Member

WIthout looking at the code: How about just trying to .encode() whatever gets send to the reporter?

hmm.. cant reproduce this warning message locally anymore.. but it's still showing up in CI

Member

megies commented Dec 11, 2017

WIthout looking at the code: How about just trying to .encode() whatever gets send to the reporter?

hmm.. cant reproduce this warning message locally anymore.. but it's still showing up in CI

testing: properly encode data sent to tests.obspy.org in POST
try to get rid of e.g.
https://travis-ci.org/obspy/obspy/jobs/314730789#L1862

"""
/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py:304:
DeprecationWarning: unicode for buf is no longer accepted, use bytes
  return self.connection.send(data)
"""
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Feb 28, 2018

Member

Last commit seems to properly suppress that warning message..

Member

megies commented Feb 28, 2018

Last commit seems to properly suppress that warning message..

@megies megies merged commit 2537cd5 into maintenance_1.1.x Feb 28, 2018

4 of 6 checks passed

codecov/patch 87.5% of diff hit (target 90%)
Details
docker-testbot docker testbot results not available yet
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 88.08% (+1.18%) compared to 86a9113
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@megies megies deleted the parse_test_report_url branch Feb 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment