-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bugfix/tests #72
Bugfix/tests #72
Conversation
@Kick1911 oh wow thanks for doing this 🥳 I'm going to take an in depth look this afternoon EST. Talk soon 🏄 |
tests/test_connection.py
Outdated
@@ -33,7 +33,7 @@ def con(fshost, loop): | |||
@pytest.mark.parametrize( | |||
'password, expect_auth', | |||
[('doggy', False), ('ClueCon', True)], | |||
ids=lambda item: "pw={}, expect_auth={}".format(*item), | |||
# ids=lambda item: "pw={}, expect_auth={}".format(*item), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this was removed?
It's not a big deal but iirc these ids
tags sure are handy when doing manual runs of the test suite from console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added it back in, but it works differently now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sudonum yeah this looks great to me 👍
The only thing I'd love to see in this PR is tweaks to get CI working again.
Let me see if I can figure that out this afternoon.
Huh, so can't remember if I disabled the CI run or not but the results from this branch are here: Looks like for nightly we need to install a newer C++ compiler. |
There, travis needed to be re-synced 🙄 |
I am busy trying to get GH action to work on my fork. I am getting somewhere. |
@Kick1911 just looking at your actions run and it looks like we might be still hitting the same issue of needing a health check directive in the dockerfile as required by the I think this may be why the CI stopped working initially as well? Maybe we can just stick in a flag to ignore the health check in the plugin or see if this freeswitch image can be changed to include it? |
Huh, the health check appears to be in the base image so i'm not entirely sure what's wrong here. It also is in the official image. Maybe it's this attr path is incorrect? |
@Kick1911 if you're confident in this I'm fine to merge. This project needs some life brought back 😂 |
@goodboy I am not completely happy with it yet. In my experimentation branch I realised that some changes I made are not backwards compatible. I realised this when manually running the tests on my laptop with different versions on python 3.x. I made it backwards compatible here: |
@Kick1911 sounds good. Just let me know when you're happy. I'm pretty sure running the tests locally should be pretty straight forward. |
Ok. Found out what the problem was by pure luck. All tests pass for python 3.6. One test fails for python 3.7 and 3.8. |
@goodboy I think you can merge it now and enable the github action that I have added if you are happy. Unless you want to see all tests passing, then I can change it to only run tests for python 3.6 to get the nice green tick. |
hey @Kick1911 thanks for this work and sorry about 👻 ing again - I'm not paying attention to the GH feed as much as I should.
Amazing. nice to see the suite run on 3.8 as well.
Weird i only see the 3.8 run actually terminating with the one error.
Can we maybe just skip this test for now and make an issue about it? Thanks again for all this hard work! |
tests/conftest.py
Outdated
@@ -67,7 +67,7 @@ def containers(request, confdir): | |||
if request.config.option.usedocker: | |||
docker = request.getfixturevalue('dockerctl') | |||
with docker.run( | |||
'safarov/freeswitch', | |||
'safarov/freeswitch:1.10.3', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably have a CD process eventually that keeps us in sync with core fs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the maintainer added a latest tag 4 months ago. I'll use that tag instead.
Hmm also, aren't we going to need a version pin in Gonna be nice to get a new release out if we can get this all up and running again 🏄🏼 |
@goodboy Ok, I think it is all good now. All tests pass. |
@@ -67,7 +67,7 @@ def containers(request, confdir): | |||
if request.config.option.usedocker: | |||
docker = request.getfixturevalue('dockerctl') | |||
with docker.run( | |||
'safarov/freeswitch:1.10.3', | |||
'safarov/freeswitch:latest', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
@@ -271,6 +271,11 @@ def test_with_orig(get_orig, measure, storer): | |||
|
|||
# configure max calls originated to length of of storer buffer | |||
cdr_storer = orig.measurers['CDR'].storer | |||
|
|||
if (cdr_storer.storetype.__name__ == 'CSVStore' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's up here but we're skipping this measurement test for now since it's flaky in github actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to skip that storertype, but not skip the other storertype. I didn't know if I should skip the test completely for all python 3.7+ or not.
@goodboy Done |
@Kick1911 oh shoot we probably need to move the CI readme badge to GH actions as well. Feel free to PR that in if you want but no presh. |
Fixing tests to run on python 3.7
pytest --use-docker tests/
(tests/apps/test_measure.py::test_with_orig[CSVStore]
)Main changes
safarov/freeswitch
must now be specified. Using1.10.3