cs3org / ocm-test-suite

Test suites for protocols a Personal Data Store may support
https://pdsinterop.org/test-suites/
MIT License
0 stars 8 forks source link

stub1 -> revad2 #44

Closed michielbdejong closed 3 years ago

michielbdejong commented 3 years ago

same setup as https://github.com/cs3org/ocm-test-suite/issues/43#issuecomment-950851001 but in the opposite direction

michielbdejong commented 3 years ago

Let's try shareWith flow

michielbdejong commented 3 years ago

it looks like the share gets created, but:

2021-10-25 12:23:38.78 ERR ../../reva/internal/grpc/services/ocmshareprovider/ocmshareprovider.go:253 > error updating received share error="error: not found: id:<1:\"\\x12$5d028699-f43c-4205-9f7f-cd39815cf86e\" > 2:2 " pid=327 pkg=rgrpc

not sure what's happening there

michielbdejong commented 3 years ago

root@ubuntu-s-4vcpu-8gb-amd-ams3-01:~/ocm-test-suite# docker exec -it revad2.docker /bin/bash
root@1d213f422e5d:/etc/revad# /reva/cmd/reva/reva -host revad2.docker:19000 -insecure
reva-cli v1.7.0-315-g2b7dbfac (rev-2b7dbfac)
Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: marie
password: OK
>> ocm-share-list
+---+-----------+----------------+------------+-------------+------+-----------+-------------+------------------+---------+---------+
| # | OWNER.IDP | OWNER.OPAQUEID | RESOURCEID | PERMISSIONS | TYPE | SHARETYPE | GRANTEE.IDP | GRANTEE.OPAQUEID | CREATED | UPDATED |
+---+-----------+----------------+------------+-------------+------+-----------+-------------+------------------+---------+---------+
+---+-----------+----------------+------------+-------------+------+-----------+-------------+------------------+---------+---------+
>> ocm-share-list-received
+--------------------------------------+--------------+----------------+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+--------------------+
| #                                    | OWNER.IDP    | OWNER.OPAQUEID | RESOURCEID                                    | PERMISSIONS                                                                                                                                                       | TYPE              | GRANTEE.IDP   | GRANTEE.OPAQUEID                     | CREATED                       | UPDATED                       | STATE               | SHARETYPE          |
+--------------------------------------+--------------+----------------+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+--------------------+
| 5d028699-f43c-4205-9f7f-cd39815cf86e | stub2.docker | einstein       | storage_id:"remote" opaque_id:"stub2.docker"  | permissions:<get_path:true get_quota:true initiate_file_download:true list_grants:true list_container:true list_file_versions:true list_recycle:true stat:true >  | GRANTEE_TYPE_USER | revad2.docker | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2021-10-25 12:23:38 +0000 UTC | 2021-10-25 12:23:38 +0000 UTC | SHARE_STATE_PENDING | SHARE_TYPE_REGULAR |
+--------------------------------------+--------------+----------------+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+--------------------+
>> 
``
michielbdejong commented 3 years ago

In stub1.docker container, should run:

root@f7418b290e00:/ocm-stub# HOST=stub1 NODE_TLS_REJECT_UNAUTHORIZED=0 node stub.js
michielbdejong commented 3 years ago
ocm-share-update-received -state=accepted 175f40f4-4f76-43a4-9140-1cf6cc41c4a9

from reva-cli works

michielbdejong commented 3 years ago

Ah, it was because the pass-ocm-test-suite branch in my fork of reva was very outdated and was still using the previous version of the reva API.

michielbdejong commented 3 years ago

New error:

2021-10-25 13:25:58.121 ERR ../../reva/internal/grpc/services/gateway/ocmshareprovider.go:214 > gateway: error calling UpdateReceivedShare error="rpc error: code = Internal desc = runtime error: invalid memory address or nil pointer dereference" pid=2167 pkg=rgrpc
michielbdejong commented 3 years ago

fixed using google-protobuf/google/protobuf/field_mask_pb \o/