Skip to content

Commit

Permalink
rename osim api to workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Conrado Costa <[email protected]>
  • Loading branch information
costaconrado committed Nov 27, 2023
1 parent b712320 commit 430878a
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 169 deletions.
10 changes: 5 additions & 5 deletions apps/workflows/tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class TestEndpoints(object):
# osim/
# workflows/
def test_index_auth(self, auth_client, test_scheme_host):
"""test authenticated index API endpoint"""
response = auth_client.get(f"{test_scheme_host}/")
Expand All @@ -25,13 +25,13 @@ def test_index_no_auth(self, client, test_scheme_host):
response = client.get(f"{test_scheme_host}/")
assert response.status_code == 401

# osim/healthy
# workflows/healthy
def test_health(self, client, test_scheme_host):
"""test health API endpoint"""
response = client.get(f"{test_scheme_host}/healthy")
assert response.status_code == 200

# osim/workflows
# workflows/workflows
def test_workflows_auth(self, auth_client, test_api_uri):
"""test authenticated workflows API endpoint"""
response = auth_client.get(f"{test_api_uri}/workflows")
Expand All @@ -55,7 +55,7 @@ def test_workflows_cve(self, auth_client, test_api_uri):
assert "classification" in body
assert "workflows" not in body

# osim/workflows/{flaw}
# workflows/workflows/{flaw}
def test_workflows_uuid(self, auth_client, test_api_uri):
"""test authenticated workflow classification API endpoint"""
flaw = FlawFactory()
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_workflows_uuid_no_auth(self, client, test_api_uri):
response = client.get(f"{test_api_uri}/workflows/{flaw.uuid}")
assert response.status_code == 401

# osim/workflows/{flaw}/adjust
# workflows/workflows/{flaw}/adjust
def test_workflows_uuid_adjusting(self, auth_client, test_api_uri):
"""test flaw classification adjustion after metadata change"""
workflow_framework = WorkflowFramework()
Expand Down
6 changes: 3 additions & 3 deletions apps/workflows/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
urlpatterns = [
path("", index.as_view()),
path("healthy", healthy.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/workflows", workflows.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/workflows/<str:pk>", classification.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/workflows/<str:pk>/adjust", adjust.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}", workflows.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/<str:pk>", classification.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/<str:pk>/adjust", adjust.as_view()),
path(f"api/{WORKFLOWS_API_VERSION}/graph/workflows", graph_workflows.as_view()),
path(
f"api/{WORKFLOWS_API_VERSION}/graph/workflows/<str:pk>",
Expand Down
2 changes: 1 addition & 1 deletion config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Exploits
path("exploits/", include("apps.exploits.urls")),
# Workflows
path("osim/", include("apps.workflows.urls")),
path("workflows/", include("apps.workflows.urls")),
# Task Manager
path("taskman/", include("apps.taskman.urls")),
# collectors
Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
/collectors/api/v1/status endpoint
- fix schema to reflect Erratum shipped_dt to be nullable

### Changed
- Renamed OSIM module to Workflows (OSIDB-1395)

### Removed
- Remove daily monitoring email for failed tasks / collectors (OSIDB-1215)

Expand Down
Loading

0 comments on commit 430878a

Please sign in to comment.