Skip to content

Commit

Permalink
Merge pull request #4731 from jmcrawford45/PS-5576
Browse files Browse the repository at this point in the history
Fix plugins list endpoint
  • Loading branch information
jmcrawford45 authored Dec 5, 2023
2 parents ce352c5 + 153e2ab commit 565b61c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
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

0 comments on commit 565b61c

Please sign in to comment.