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

Add new koko test (070) and eslint housekeeping #47

Merged
merged 3 commits into from
Apr 18, 2023
Merged

Conversation

fschade
Copy link
Collaborator

@fschade fschade commented Apr 5, 2023

Code abstract

  • add new 070-user-group-search-and-share test and docs from the koko test paper
  • add new groups api and add those to the tdk client
  • add several es-lint rules to the default config and apply those

Description

sorry for all that noise, essentially this pr only touches test files, specially the newly added 070-user-group-search-and-share test and docs. Unfortunately i had to apply some new eslint rules for better code style which results in many chore changes.

to review you should primary review:

everything else is noise from the linter (you can review it if you want to 😄)

Test abstract

The user group search and share test creates a configurable amount of share receivers (users and groups),
folders and files, once the provisioning is done, the users search for all share receivers (users and groups),
and then shares the provisioned resources with each.

To confirm that everything went well, the test compares the resolved share recipient with initial share receiver.

  • admin creates N users.
    • N can be set by using the k6 --vus option.
    • by default, it set to 1.
  • admin creates N share receiver groups.
    • N can be set with the environment variable SHARE_RECEIVERS_GROUP_COUNT.
  • admin creates N share receiver users.
    • N can be set with the environment variable SHARE_RECEIVERS_USER_COUNT.
  • each user logs into the system individually.
  • each user creates N folders.
    • N can be set with the environment variable ASSETS_FOLDER_COUNT.
  • each user searches for each share receiver.
  • each user shares each folder to all share receivers.
  • each user creates N txt files.
    • N can be set with the environment variable ASSETS_TEXT_DOCUMENT_COUNT.
  • each user searches for each share receiver.
  • each user shares each txt file to all share receivers.
  • each user deletes the created files and folders to finalize the test.
  • admin deletes the created users.
  • admin deletes the created share receiver users.
  • admin deletes the created share receiver groups.

- add new 070-user-group-search-and-share test and docs from the koko test paper
- add new groups api and add those to the tdk client
- add several es-lint rules to the default config and apply those
@@ -16,56 +15,66 @@ export class Search {
this.#api = api;
}

sharee(search: string, itemType: ItemType): RefinedResponse<'text'> {
Copy link
Contributor

Choose a reason for hiding this comment

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

just a suggestion: maybe it make sence to create separate sharee.ts file for method sharee and rename sharee as get.
then we get userClient.sharee.get(adminCredential.login, ItemType.folder)

Just `search' I mean using REPORT request

Otherwise ok. I ran the tests - everything works fine

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks @ScharfViktor, sorry for that but maybe it makes more sense to just merge those 4PRs and concentrate on, #52. As described here this finishes the api's:

#51

const createdShareResponse = userClient.share.create(
folderMovedName,
adminCredential.login,
const shareeSearchResponse = userClient.search.sharee(adminCredential.login, ItemType.folder)
Copy link
Contributor

Choose a reason for hiding this comment

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

then we can userClient.sharee.get(adminCredential.login, ItemType.folder)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

see above, sorry 😢

@fschade fschade merged commit e423839 into main Apr 18, 2023
@delete-merged-branch delete-merged-branch bot deleted the koko-test-070 branch April 18, 2023 08:22
fschade added a commit that referenced this pull request Apr 18, 2023
#47) (#48)

* feat(test): add new koko tests and eslint housekeeping

- add new 070-user-group-search-and-share test and docs from the koko test paper
- add new groups api and add those to the tdk client
- add several es-lint rules to the default config and apply those

* fix(artifacts): rebuild artifacts after rebase

* fix(test): fix wrong path

* feat(test): add new koko tests and some test housekeeping

- add new 080-create-space test and docs based on the koko test paper
- add client version guard to protect the test from unsupported client versions
- rename the api tdk package to endpoints, to not have a api.api route which is needed for ocis
- add eslint rule to have linebreaks between class members
- stop using k6 response json method
- add client endpoints for application
- add client endpoints for drive
- add client endpoints for role

* - add missing client demos to the kitchen sink test
- fix static space creation count
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

Successfully merging this pull request may close these issues.

3 participants