Skip to content
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

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

Closed
michielbdejong opened this issue Oct 17, 2022 · 4 comments
Closed

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

michielbdejong opened this issue Oct 17, 2022 · 4 comments

Comments

@michielbdejong
Copy link
Member

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
Copy link
Member Author

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 cs3org/reva#3364

@michielbdejong
Copy link
Member Author

michielbdejong commented Nov 29, 2022

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 | [email protected] | NULL     | einstein  | einstein      |   NULL | file      | 3           | NULL        |           3 |             |           1 | 1669727774 |        0 | NULL       | JckwMsu6rbSx8B2 |         0 | NULL       |                0 | NULL |             0 | NULL  | NULL                     |
|  2 |          6 | [email protected]     | 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:

  • token is apparently regenerated at some point (doesn't match)
  • path is missing first 5 characters (is /home prefix stripped twice?)
  • remote is wrong

@michielbdejong michielbdejong moved this from Planned to Done in Sciencemesh: road to production Nov 29, 2022
@michielbdejong michielbdejong moved this from Done to In Progress in Sciencemesh: road to production Nov 29, 2022
@michielbdejong
Copy link
Member Author

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

michielbdejong added a commit to cs3org/reva that referenced this issue Nov 29, 2022
michielbdejong added a commit to sciencemesh/nc-sciencemesh that referenced this issue Nov 29, 2022
@michielbdejong
Copy link
Member Author

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

Repository owner moved this from In Progress to Done in Sciencemesh: road to production Nov 29, 2022
glpatcern added a commit to cs3org/reva that referenced this issue Dec 7, 2022
* [draft] improve ocmd send sourcePath 404 error message

* print error message when forwarding invite fails

* Resolve #3365 (comment)

* changelog entry

* report unexpected response codes from EFSS API

* fix

* Add appropriate PR link in changelog entry

* Also allow 201 responses

* Also throw on EFSS API response codes from other Nextcloud backends

* built

* Fix username in upload call path

* Improved error message

* trying to debug pondersource/sciencemesh-php#100

* Fix pondersource/sciencemesh-php#100

* fix share object in OCM share backend

* Fix double declaration of genID

* info logging

* syntax fix

* Improve 'request not handled' error message

* Init log

* fix pondersource/sciencemesh-php#114

* return JSON share object on ocm/send

* How do we tell Nextcloud which WebDAV server to mount this share from?

* read webdav host from config

* better error messages from OCM /share endpoint

* Fix pondersource/sciencemesh-php#91 (comment)

* Split owner string

* return JSON from invite forward

* message: Success

* Fix merge

* make lint (first try)

* make lint (second try)

* remove unnecessary newlines

* outdent

* gofmt -s pkg/storage/fs/nextcloud/nextcloud_server_mock.

* Fix changelog for calens

* Fix make test

* fix lint

* Prepend /home to all paths in mock server

* Run make lint-fix

* Improve error message on error sending accept post request

* tmpdir for gitpod

* reset server mock

* reset server mock

* Use helpers.TempDir

* integration tests now also use this TempDir

* apply https://github.com/cs3org/reva/pull/3526/files#r1042061882

* tests passing

* uncomment

* /workspace/reva/toolchain/golangci-lint run --fix

* Fix case /some

* make some paths relative

* original/location

* /workspace/reva/toolchain/golangci-lint run --fix

Co-authored-by: root <[email protected]>
Co-authored-by: Michiel de Jong <[email protected]>
Co-authored-by: Giuseppe Lo Presti <[email protected]>
Co-authored-by: Vasco Guita <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant