Skip to content

Add Reva #35

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

Merged
merged 26 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5d5a580
RUN mkdir -p /var/tmp/reva/
michielbdejong Aug 5, 2021
9ef7cfb
Add stub and revad to the testnet
michielbdejong Aug 5, 2021
c46b375
Add stub and revad to the testnet
michielbdejong Aug 5, 2021
7251ec6
GUI_TYPE_REVA
michielbdejong Aug 5, 2021
fa90b1f
Stub -> Reva
michielbdejong Aug 5, 2021
e2f2d66
no ocm prefix on ocmd
michielbdejong Aug 6, 2021
f073081
Move ocdav way from root
Aug 6, 2021
0abd910
Use v1.11.0 of reva
michielbdejong Aug 6, 2021
7f9df4c
Move http service from port 19001 to port 80
michielbdejong Aug 6, 2021
1a7bd44
specify host and provider for ocmd in revad
michielbdejong Aug 6, 2021
16919dc
add-reva adjustments
michielbdejong Aug 9, 2021
da559a8
avoid user@https://host format
michielbdejong Aug 9, 2021
a21c920
Use pass-ocm-test-suite branch
michielbdejong Aug 9, 2021
3cff77d
Run --rm
michielbdejong Aug 9, 2021
683fe55
Fix revad.toml for ocmd
michielbdejong Aug 9, 2021
8c58f16
Adapt ocm-stub to revad
michielbdejong Aug 9, 2021
4030161
basic example
michielbdejong Aug 10, 2021
2710c56
Update outdated dependencies
michielbdejong Aug 10, 2021
60ca2da
core access token not found
michielbdejong Aug 10, 2021
4818652
Latest test script version from https://github.com/cs3org/node-cs3api…
michielbdejong Aug 11, 2021
129c497
Split out reva-client.js
michielbdejong Aug 11, 2021
25365ec
trying to work out how to get the ShareReference from the shares list…
michielbdejong Aug 11, 2021
897f2ce
Read out all info about shares
michielbdejong Aug 12, 2021
50c01a7
Accept Share working
michielbdejong Aug 12, 2021
d1238de
client.acceptAllShares from ocm.test.ts
michielbdejong Aug 12, 2021
a4af6cb
Merge pull request #36 from cs3org/reva-client
michielbdejong Aug 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ docker ps

git clone https://github.com/cs3org/ocm-test-suite
cd ocm-test-suite
git checkout wip-docker
git checkout add-reva
git clone https://github.com/michielbdejong/ocm-stub
git clone https://github.com/cs3org/reva
cd ocm-stub
git checkout adapt-to-revad
cd ..
git clone https://github.com/michielbdejong/reva
cd reva
git checkout pass-ocm-test-suite
cd ..


./build.sh
docker network create testnet
docker run -d --network=testnet --name=nc1.docker nextcloud
docker run -d --network=testnet --name=nc2.docker nextcloud
docker run -d --network=testnet --rm --name=nc1.docker nextcloud
docker run -d --network=testnet --rm --name=nc2.docker nextcloud
docker run -d --network=testnet --rm --name=stub1.docker stub
docker run -d --network=testnet --rm --name=stub2.docker stub
docker run -d --network=testnet --rm --name=revad1.docker revad
docker run -d --network=testnet --rm --name=revad2.docker revad
docker run -p 6080:80 -p 5900:5900 -v /dev/shm:/dev/shm --network=testnet --name=tester -d --cap-add=SYS_ADMIN tester

TESTER_IP_ADDR=`docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' tester`
Expand Down Expand Up @@ -63,6 +74,7 @@ Now to run the tests, open a terminal (Start->System Tools->LXTerminal) and type
/bin/bash /ubuntu-init-script.sh
source ~/.bashrc
cd ~/ocm-test-suite
git checkout add-reva
npm run debug
`

Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ docker build -t stub .
cd ..
# rm -rf ocm-stub

# git clone https://github.com/cs3org/reva
# git clone https://github.com/michielbdejong/reva
cd reva
git checkout 56c89e07cf0c68d
# git checkout pass-ocm-test-suite
docker build -t revadbase -f ./Dockerfile.revad .
cd ..
# rm -rf reva
Expand Down
20 changes: 14 additions & 6 deletions ocm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ const { GUI_TYPE_STUB,
GUI_TYPE_OWNCLOUD,
GUI_TYPE_NEXTCLOUD,
GUI_TYPE_SEAFILE,
GUI_TYPE_REVA,
params } = (process.env.LIVE ? require("./params-live") : require("./params-docker"));

const RevaClient = require("./reva-client");

const JEST_TIMEOUT = 60000;
const HEADLESS = !!process.env.HEADLESS;
console.log({ HEADLESS });
Expand All @@ -15,16 +18,18 @@ const flows = [
// 'Share-with flow'
];
const froms = [
// 'From Stub',
'From Stub',
// 'From ownCloud',
'From Nextcloud',
// 'From Nextcloud',
// 'From Seafile',
// 'From Reva',
];
const tos = [
// 'To Stub',
// 'To ownCloud',
'To Nextcloud',
// 'To Nextcloud',
// 'To Seafile',
'To Reva',
];

class User {
Expand Down Expand Up @@ -140,7 +145,7 @@ class User {
// FIXME: Find a nicer way to do this:
await new Promise((resolve) => setTimeout(resolve, 1000));

await this.type('div.multiselect__tags input.multiselect__input', `${shareWithUser}@https://${shareWithHost}`);
await this.type('div.multiselect__tags input.multiselect__input', `${shareWithUser}@${shareWithHost}`);
await this.go('span.option__desc--lineone');
} else if (this.guiType === GUI_TYPE_SEAFILE) {
throw new Error('FIXME: https://github.com/michielbdejong/ocm-test-suite/issues/4');
Expand All @@ -151,7 +156,7 @@ class User {
async acceptPublicLink(url, remoteGuiType) {
await this.page.goto(url);
if (remoteGuiType === GUI_TYPE_STUB) {
const consumer = encodeURIComponent(`${this.username}@https://${this.host}`);
const consumer = encodeURIComponent(`${this.username}@${this.host}`);
const newUrl = new URL(`?saveTo=${consumer}`, url).toString();
// console.log('accepting public link', newUrl);
await this.page.goto(newUrl);
Expand All @@ -162,7 +167,7 @@ class User {
} else if (remoteGuiType === GUI_TYPE_NEXTCLOUD) {
await this.go('button.menutoggle');
await this.go('button#save-external-share');
await this.page.type('#remote_address', `${this.username}@https://${this.host}`);
await this.page.type('#remote_address', `${this.username}@${this.host}`);
await this.page.click('#save-button-confirm');
} else if (remoteGuiType === GUI_TYPE_SEAFILE) {
throw new Error('FIXME: https://github.com/michielbdejong/ocm-test-suite/issues/4');
Expand Down Expand Up @@ -214,6 +219,9 @@ class User {
);
} else if (this.guiType === GUI_TYPE_SEAFILE) {
throw new Error('FIXME: https://github.com/michielbdejong/ocm-test-suite/issues/4');
} else if (this.guiType === GUI_TYPE_REVA) {
const client = new RevaClient('revad2.docker:19000', 'marie', 'radioactivity');
await client.acceptAllShares();
} else {
throw new Error(`GUI type "${this.guiType}" not recognized`);
}
Expand Down
Loading