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

Fix plugins list endpoint #4731

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions lemur/plugins/lemur_vault_dest/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class VaultSourcePlugin(SourcePlugin):
"name": "vaultUrl",
"type": "str",
"required": True,
"validation": URL_RE,
"validation": URL_RE.pattern,
"helpMessage": "Valid URL to Hashi Vault instance",
},
{
Expand Down Expand Up @@ -166,7 +166,7 @@ class VaultDestinationPlugin(DestinationPlugin):
"name": "vaultUrl",
"type": "str",
"required": True,
"validation": URL_RE,
"validation": URL_RE.pattern,
"helpMessage": "Valid URL to Hashi Vault instance",
},
{
Expand Down
20 changes: 20 additions & 0 deletions lemur/tests/test_plugins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from lemur.plugins.views import * # noqa


from .vectors import (
VALID_ADMIN_HEADER_TOKEN,
)


def test_plugins_list_get(client, app):
response = client.get(api.url_for(PluginsList), headers=VALID_ADMIN_HEADER_TOKEN)
assert response.status_code == 200

data = response.get_json()

# Perform some assertions on data based on what you expect
assert 'items' in data
assert isinstance(data['items'], list)

for item in data['items']:
assert 'title' in item