-
Notifications
You must be signed in to change notification settings - Fork 90
Make key description optional #1067
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,6 +206,27 @@ def test_key_info(client): | |
pass | ||
|
||
|
||
@fixture(scope="function") | ||
def test_nondescript_key_info(client): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is really necessary, I didn't just change the The reason why I think it would probably be best to delete this function and update the original one to use
https://www.meilisearch.com/docs/reference/api/keys#get-all-keys |
||
key_info = { | ||
"name": "keyWithoutDescription", | ||
"actions": ["search"], | ||
"indexes": [common.INDEX_UID], | ||
"expiresAt": None, | ||
} | ||
|
||
yield key_info | ||
|
||
try: | ||
keys = client.get_keys().results | ||
key = next(x for x in keys if x.name == key_info["name"]) | ||
client.delete_key(key.key) | ||
except MeilisearchApiError: | ||
pass | ||
except StopIteration: | ||
pass | ||
|
||
|
||
@fixture(scope="function") | ||
def get_private_key(client): | ||
keys = client.get_keys().results | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did confirm it breaks without the change in the non-test code.