pondersource / sciencemesh-php

Connect your Nextcloud server to Sciencemesh
MIT License
0 stars 1 forks source link

Run ocm-test-suite reva-to-reva and test more things #91

Closed michielbdejong closed 2 years ago

michielbdejong commented 2 years ago

The ocm-test-suite passes when you run it reva-to-reva, but it doesn't actually test accessing the share or removing the share. Adding those two test steps on the receiving end will help test and debug various sending ends.

I created an accessShare function and am now doubting whether the sending reva is even exposing a webdav server. I'm investigating https://reva.link/docs/config/http/services/owncloud/ocdav/ and setting up an edit-compile-run loop with reva code mounted from the host.

michielbdejong commented 2 years ago
root@93f2fdbfb2ff:/etc/revad# /reva/cmd/reva/reva -insecure -host localhost:19000
reva-cli 9567525 (rev-9567525)
Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: marie
password: OK
>> ocm-share-list-received
+--------------------------------------+---------------+--------------------------------------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+----------------------+--------------------+
| #                                    | OWNER.IDP     | OWNER.OPAQUEID                       | RESOURCEID                                                 | PERMISSIONS                                                                                                                                                     | TYPE              | GRANTEE.IDP   | GRANTEE.OPAQUEID                     | CREATED                       | UPDATED                       | STATE                | SHARETYPE          |
+--------------------------------------+---------------+--------------------------------------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+----------------------+--------------------+
| af637274-f365-4ef7-b6a8-c1aac999023d | revad1.docker | 4c510ada-c86b-4815-8820-42cdf82c3d51 | storage_id:"remote" opaque_id:"path/to/the/file/name.txt"  | permissions:<add_grant:true get_path:true get_quota:true initiate_file_download:true list_container:true list_file_versions:true list_recycle:true stat:true >  | GRANTEE_TYPE_USER | revad2.docker | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2022-10-17 08:25:24 +0000 UTC | 2022-10-17 08:25:24 +0000 UTC | SHARE_STATE_ACCEPTED | SHARE_TYPE_REGULAR |
+--------------------------------------+---------------+--------------------------------------+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+--------------------------------------+-------------------------------+-------------------------------+----------------------+--------------------+
>> 

That path/to/the/file/name.txt comes from https://github.com/cs3org/ocm-test-suite/blob/ebe9ab3/clients/reva.ts#L267 And https://github.com/cs3org/reva/issues/3364

michielbdejong commented 2 years ago

On maria1:


MariaDB [nextcloud]> select * from oc_share;
+----+------------+----------------------+----------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+--------------------------+
| id | share_type | share_with           | password | uid_owner | uid_initiator | parent | item_type | item_source | item_target | file_source | file_target | permissions | stime      | accepted | expiration | token           | mail_send | share_name | password_by_talk | note | hide_download | label | password_expiration_time |
+----+------------+----------------------+----------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+--------------------------+
|  1 |       1000 | marie@revanc2.docker | NULL     | einstein  | einstein      |   NULL | file      | 3           | NULL        |           3 |             |           1 | 1669727774 |        0 | NULL       | JckwMsu6rbSx8B2 |         0 | NULL       |                0 | NULL |             0 | NULL  | NULL                     |
|  2 |          6 | marie@nc2.docker     | NULL     | einstein  | einstein      |   NULL | folder    | 36          | NULL        |          36 |             |          31 | 1669727812 |        0 | NULL       | EBnuUVevfqCe2f0 |         0 | NULL       |                0 | NULL |             0 | NULL  | NULL                     |
+----+------------+----------------------+----------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+--------------------------+
2 rows in set (0.000 sec)

On maria2:

MariaDB [nextcloud]> select * from oc_share_external;
+----+--------+------------+-------------------------+-----------+-----------------+----------+---------+----------+-------+-------------------------------------+----------------------------------+----------+
| id | parent | share_type | remote                  | remote_id | share_token     | password | name    | owner    | user  | mountpoint                          | mountpoint_hash                  | accepted |
+----+--------+------------+-------------------------+-----------+-----------------+----------+---------+----------+-------+-------------------------------------+----------------------------------+----------+
|  1 |     -1 |          0 | https://revanc1.docker/ | 1         | MJrTXrdzPq      |          | ome.txt | einstein | marie | {{TemporaryMountPointName#ome.txt}} | c9025d0b36e4f9b079e77981602db8dd |        0 |
|  2 |     -1 |          0 | https://nc1.docker/     | 2         | EBnuUVevfqCe2f0 |          | /reg    | einstein | marie | {{TemporaryMountPointName#/reg}}    | db14052e5a1147d0c7aa1792ff9ea490 |        0 |
+----+--------+------------+-------------------------+-----------+-----------------+----------+---------+----------+-------+-------------------------------------+----------------------------------+----------+
2 rows in set (0.000 sec)

Differences:

michielbdejong commented 2 years ago

The accept notification fails with '400 Bad request response:\n{\"message\":\"Can not find share with ID: 5\"}\n'

michielbdejong commented 2 years ago

Nextcloud -> Reva -> Reva -> Nextcloud is now all working properly.