Skip to content

Integration tests - Starting to share with custom groups - #26

Merged
PVince81 merged 7 commits into
masterfrom
inttest-sharing-customgroups
Mar 1, 2017
Merged

PVince81 merged 7 commits into
masterfrom
inttest-sharing-customgroups

Conversation

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

@PVince81 The starting test case is failing, something not working or the test is not correct?.

@SergioBertolinSG SergioBertolinSG added this to the 10.0 milestone Feb 23, 2017
@SergioBertolinSG SergioBertolinSG changed the title Starting to share with custom groups Integration tests - Starting to share with custom groups Feb 23, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply And file "welcome.txt" of user "user0" is shared with group "sharing-group" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it is the simplest example, I like to have the simplest as a call to the api and make that abstract in the next test.

@PVince81

Copy link
Copy Markdown
Contributor

Maybe the file "welcome.txt" doesn't exist ? Are skeleton files copied when running integration tests from apps ?

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

Ah right, they don't have the skeleton.

Missing this
#Set up personalized skeleton
$OCC config:system:set skeletondirectory --value="$(pwd)/skeleton"****

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author
  -    1 => 'sharing-group'
  +    1 => 'customgroup_17'

Problem with the group names. They have as name customgroup_X, being X an autoincremental value.

We should avoid this. @PVince81 is this a bug in the app?

Not sure if this is the displayname, but if that is the case, should we set a display name after creation?

@PVince81

Copy link
Copy Markdown
Contributor

Ah yes, this is by design. I needed an internal group id that doesn't conflict with any other user backends so it's "customgroups_" + numeric id of the custom group.

The display name is used in the sharing dialog.

Now considering that the "uri" of a custom group is supposed to be unique, I could replace the autoincrement value with the uri. So the id would become "customgroups_sharing-group".

Note that the "uri" is specified at creation time and can never change even on rename (like for CalDAV).

Would that make sense ?

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

If two users want to have each a custom group called "somestring", they won't be able to do that with this approach? the uri for the custom group of the first user would be "customgroups_somestring" but what about the second?

@PVince81

Copy link
Copy Markdown
Contributor

The client needs to contain logic to check for duplicates.
If you do a mkcol on "somestring" and you get 405, then you need to try "somestring2".
But in the end you still set the display name to "somestring".

I had to implement that logic into the frontend code... Webdav fun...

@PVince81

Copy link
Copy Markdown
Contributor

Now using uri field for compoung group backend id ba84877 (@jvillafanez @DeepDiver1975 FYI)

The test now passes locally.

@PVince81

Copy link
Copy Markdown
Contributor

@jvillafanez @DeepDiver1975 please review this change

@jvillafanez

Copy link
Copy Markdown
Member

Code looks good so far.

@PVince81

PVince81 commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

looks like I missed some stuff.

@PVince81 PVince81 mentioned this pull request Mar 1, 2017
1 task
@PVince81
PVince81 force-pushed the inttest-sharing-customgroups branch from a95aa6b to 228f3d6 Compare March 1, 2017 14:00
@PVince81

PVince81 commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

Rebased to get the pagination changes in as well.

@SergioBertolinSG if all tests pass now I suggest we merge this before continuing. I want to have the uri stuff on master.

@PVince81

PVince81 commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

Fixed role filter calls

@PVince81
PVince81 merged commit 38a572c into master Mar 1, 2017
@PVince81
PVince81 deleted the inttest-sharing-customgroups branch March 1, 2017 15:14
@PVince81

PVince81 commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

Merged now. @SergioBertolinSG please do a separate PR for your new tests. Let's hope you won't find any new issues 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants