Conversation
|
|
||
| def test_get_capabilities(self): | ||
| res = self.nxc.get_capabilities() | ||
| assert res['ocs']['meta']['statuscode'] == self.SUCCESS_CODE |
There was a problem hiding this comment.
This test doesn't test much, do you have any ideas how to change that? I understand that capabilities may vary on the test environment, but if we add e.g. env vars to it, we may squeeze something out of it.
There was a problem hiding this comment.
Agree, one of the main nextcloud related params, which can be set in docker-compose and cannot be changed is nextcloud version, so added it to python-api service environment variable and specified it in nextcloud Dockerfile. Amended the change to check it in test
There was a problem hiding this comment.
Great work, I propose one modification - don't check for the whole version, but go only for the major version (i.e. the X in v. X.Y.Z). Major versions don't change so often, they are part of the image name, and they test the capability query anyway. On recent-enough Docker setups, you can parametrize the FROM command using an argument that you can propagate to an environmental variable, so you don't have to repeat the literal nextcloud version on multiple places.
There was a problem hiding this comment.
Done, moved nextcloud version to parameter and check only major version in test.
4f70b2d to
23db46d
Compare
|
Hello Danil, I generally like your PR, but it needs some ironing out. If you remove all containers, pull & rebuild, it is likely that tests won't pass due to nextcloud app not initialized properly. I suggest to throw away postgres in favor to sqlite as outlined in #12, it helped me and also solves the problem with the postgres persistence side-effect. |
3db9424 to
c2f5b87
Compare
|
Hello Matej, thanks for review! I switched from postgres to sqlite as in #12 and deleted unused variables. |
|
It is great that we discovered ourselves that those data types may be somehow arbitrary and that we have to pay attention to them. And one more thing, as we have touched the test setup, you can get rid of the alias declaration in the networks configuration, as aliases that have the same name as the service are redundant, amd |
f2beae7 to
16aa9e3
Compare
|
I got rid of the aliases, thanks, and will rebase the branch after #17 merge. |
|
Great, I appreciate that. I see that you took the |
…nvironment variables to a file
…nused variables from env; fix int types in tests to strings
…nused variables from env; fix int types in tests to strings
9cdad93 to
8381994
Compare
|
Yeah, I just left ports uncommitted on local, but it should probably be in repository too. Returned it and rebased. |
|
The inspection completed: 3 updated code elements |
|
Good job! |
Add class with capabilities api endpoint
Based on #11, will rebase to master after #11 will be merged