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

Feat: Whitelist enums #5726

Merged
merged 46 commits into from
Aug 15, 2023
Merged

Conversation

2002Bishwajeet
Copy link
Contributor

What does this PR do?

Add whitelist to the enum field in the spec files

Test Plan

Manual Testing

Related PRs and Issues

Fixes #426

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

- cache caused stale data in memberships
This commit contains changes in 3 places.

- First I changed the placement of an informative comment in the DELETE TEAM controller, and moved it outside of the loop. I did this when Steven pointed out that the behaviour I describe in the comment is for the whole loop.

- The second change is the removal of my first test. I was facing quite a few issues with creating users in the test, and ended up using the CREATE TEAM MEMBERSHIP to perform 2 actions at once -> create a new user if one doesn't exist with the provided email, and create a membership for the user. Before this approach, I had quite a bit of code that didn't work, and it seems like I removed some things that weren't supposed to be removed, and didn't change variable names where necessary. Anyway, I figured that the problem has something to do with the user being created on the client side, so I moved the test to the server side.

- The new test I implemented does the same thing as my previous failed test, but in more detailed and distinct steps. The test first creates 5 new users inside of a loop, and pushes each new user's ID to an array called 'new_users' if the response is as expected. Then a new team is created. The next step is to create memberships for all 5 users. If all these steps pass, the new team that was just created, is deleted, and we check to make sure the new users have 0 team memberships each.

Formatter and linter showed no errors. Tests were successful on localhost.
@lohanidamodar lohanidamodar changed the base branch from master to 1.4.x August 4, 2023 13:46
@lohanidamodar lohanidamodar requested a review from abnegate August 4, 2023 13:46
eldadfux and others added 2 commits August 5, 2023 13:23
@abnegate abnegate changed the base branch from 1.4.x to cl-1.4.x August 8, 2023 20:54
@abnegate abnegate changed the base branch from cl-1.4.x to 1.4.x August 9, 2023 03:07
@abnegate abnegate changed the base branch from 1.4.x to master August 9, 2023 03:08
@abnegate abnegate changed the base branch from master to 1.4.x August 10, 2023 02:36
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
@abnegate abnegate requested a review from eldadfux August 15, 2023 05:16
@eldadfux
Copy link
Member

Great work @2002Bishwajeet!

@eldadfux eldadfux merged commit 279b482 into appwrite:1.4.x Aug 15, 2023
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.

OAuth provider String to Enum
6 participants