Open Fogapod opened 5 years ago
Can you assign this issue to me, I just started working on it and would like to contribute and start the unit tests and set up everything correctly
Alright, it would be very helpful if you could do this
I apoligize for the inconveniences, but several breaking changes had to be made. All changes are reflected in existing examples. Changes:
Server.respond
-> Request.reply
Server
argument in callbacks. It can be accessed using Request.server
flatten
method of responses. It was replaced with plain __await__
Client.run
-> Client.start
Server.run
-> Server.start
Were these changes made already? are they made into the master branch, if they are I can definitely pull and it shouldn't be a problem.
I am currently working on getting everything set up, the coverage page for the test and all the .py
files. and then starting to unit test one by one python file.
Yes, they are in master
I am having some issue working with Travis CI since is my first time, I am getting an error for in the virtualenv for Travis that is not recognizing one of my import. Maybe you can provide me some help or guidelines if you have seen this before, if not I will keep debugging
___________ ERROR collecting tests/unit/enums_py/StatusCode_test.py ____________ ImportError while importing test module '/home/travis/build/IOMirea/yarpc/tests/unit/enums_py/StatusCode_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/unit/enums_py/StatusCode_test.py:3: in <module> from iomirea_rpc import enums E ModuleNotFoundError: No module named 'iomirea_rpc'
Sorry for that, library was renamed to yarpc
recently
No worries I restarted and using pytests
as you want it
Hey @Fogapod, let me know if you feel this my PR #22 is missing anything to resolve thIS issue.
@Physsix27 are you going to write tests or you only wanted to configure make, Travis?
Yes I want to continue writing tests but right now I am not going to be able to bring the project to 100% coverage, I can just write test for some python files. I can write tests for request.py
, reponse.py
and abc.py
and bring those 3 files up to 100% coverage.
This is how they are currently looking:
I will work on the tests later today for the files I mentioned above
I'd suggest testing against a real redis install via docker in Travis.
@Gelbpunkt Can I get a little more detail about that and what is that since I have never done that?
@Fogapod does not like my idea, I think. Docker is a container daemon that runs on almost all platforms. It runs stuff mostly isolated from your OS. You can for example run Ubuntu or Alpine Linux in a container on a Mac. Inside a container, you can have an image. Those can be a basic OS or even contain software, for example Redis.
https://hub.docker.com/_/redis
You'd run docker pull redis:5.0.6-alpine
to pull the image to your PC (using Alpine Linux has smaller images usually).
Then you can run it and map the port inside the container to your PC.
docker run --rm -d --name redis -p 6739:6739 redis:5.0.6-alpine
This will start a container in the background which runs Redis on the container, mapping the port to your PC.
You can then use redis-cli on your machine to connect to the redis in the container.
Containers are platform-independent (mostly), usually very up to date, depending on the image, and extremely secure due to being mostly separate from the host.
Hope that helps ;)
I don't understand what you want me to do, which looks like a different issue which I don't understand much and would have to do some research to learn more about that topic. I want it to do more python tests because that is the skill I am currently trying to improve. but what you are explaining seems a little different and does not specifies what is it that I need to test. Testing against a real redis
I am not sure what that means. @Gelbpunkt
I meant that we should maybe think about not using mocks but instead using a Redis with client and server to test them
@Gelbpunkt I understand what you are trying to say but you still need to test the python code of the project as well no matter which path you take, that would be a decision of the project owner to take. What would be its advantage and disadvantages with going with one or another
@Physsix27 Is there any more progress on this? I should inform you that project was renamed from yarpc to jarpc. I hope this won't happen anymore
Tests using mock, maybe tests involving real redis in travis, coverage