-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.urls import reverse | ||
from rest_framework import status | ||
from rest_framework.test import APIClient | ||
|
||
|
||
def test_health_check_endpoint_returns_200(db: None, api_client: APIClient): | ||
# Given | ||
base_url = reverse("health:health_check_home") | ||
url = base_url + "?format=json" | ||
|
||
# When | ||
res = api_client.get(url) | ||
|
||
# Then | ||
assert res.status_code == status.HTTP_200_OK |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,9 @@ | |
from projects.models import Project | ||
|
||
|
||
def test_audit_log_can_be_filtered_by_environments(admin_client, project, environment): | ||
def test_audit_log_can_be_filtered_by_environments( | ||
admin_client: APIClient, project: Project, environment: Environment | ||
) -> None: | ||
# Given | ||
audit_env = Environment.objects.create(name="env_n", project=project) | ||
|
||
|
@@ -30,7 +32,9 @@ def test_audit_log_can_be_filtered_by_environments(admin_client, project, enviro | |
assert response.json()["results"][0]["environment"]["id"] == audit_env.id | ||
|
||
|
||
def test_audit_log_can_be_filtered_by_log_text(admin_client, project, environment): | ||
def test_audit_log_can_be_filtered_by_log_text( | ||
admin_client: APIClient, project: Project, environment: Environment | ||
) -> None: | ||
# Given | ||
flag_state_updated_log = "Flag state updated" | ||
flag_state_deleted_log = "flag state deleted" | ||
|
@@ -52,8 +56,11 @@ def test_audit_log_can_be_filtered_by_log_text(admin_client, project, environmen | |
|
||
|
||
def test_audit_log_can_be_filtered_by_project( | ||
admin_client, project, environment, organisation | ||
): | ||
admin_client: APIClient, | ||
project: Project, | ||
environment: Environment, | ||
organisation: Organisation, | ||
) -> None: | ||
# Given | ||
another_project = Project.objects.create( | ||
name="another_project", organisation=organisation | ||
|
@@ -75,8 +82,11 @@ def test_audit_log_can_be_filtered_by_project( | |
|
||
|
||
def test_audit_log_can_be_filtered_by_is_system_event( | ||
admin_client, project, environment, organisation | ||
): | ||
admin_client: APIClient, | ||
project: Project, | ||
environment: Environment, | ||
organisation: Organisation, | ||
) -> None: | ||
# Given | ||
AuditLog.objects.create(project=project, is_system_event=True) | ||
AuditLog.objects.create( | ||
|
@@ -100,7 +110,7 @@ def test_regular_user_cannot_list_audit_log( | |
organisation: Organisation, | ||
django_user_model: typing.Type[Model], | ||
api_client: APIClient, | ||
): | ||
) -> None: | ||
# Given | ||
AuditLog.objects.create(environment=environment) | ||
url = reverse("api-v1:audit-list") | ||
|
@@ -120,7 +130,7 @@ def test_admin_user_cannot_list_audit_log_of_another_organisation( | |
organisation: Organisation, | ||
project: Project, | ||
django_user_model: typing.Type[Model], | ||
): | ||
) -> None: | ||
# Given | ||
another_organisation = Organisation.objects.create(name="another organisation") | ||
user = django_user_model.objects.create(email="[email protected]") | ||
|
43caad8
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.
Successfully deployed to the following URLs:
flagsmith-frontend-preview – ./frontend
flagsmith-frontend-preview-flagsmith.vercel.app
flagsmith-frontend-production-native.vercel.app
flagsmith-frontend-preview-git-main-flagsmith.vercel.app
43caad8
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.
Successfully deployed to the following URLs:
flagsmith-frontend-staging – ./frontend
flagsmith-frontend-staging-git-main-flagsmith.vercel.app
staging.flagsmith.com
flagsmith-staging-frontend.vercel.app
flagsmith-frontend-staging-flagsmith.vercel.app
43caad8
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.
Successfully deployed to the following URLs:
docs – ./docs
docs.flagsmith.com
docs-git-main-flagsmith.vercel.app
docs.bullet-train.io
docs-flagsmith.vercel.app