make make test command much more robust + address several more backend test warnings (#2115)
# What this PR does see more detailed comments under the "Files changed" tab --------- Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
This commit is contained in:
parent
130ec3cf0a
commit
357adfbc21
9 changed files with 11 additions and 9 deletions
|
|
@ -10,8 +10,10 @@ x-oncall-build: &oncall-build-args
|
|||
|
||||
x-oncall-volumes: &oncall-volumes
|
||||
- ./engine:/etc/app
|
||||
# see all the fun answers/comments here on why we need to do this
|
||||
# tldr; using /dev/null as a default leads to a lot of fun problems
|
||||
# https://stackoverflow.com/a/60456034
|
||||
- ${ENTERPRISE_ENGINE:-/dev/null}:/etc/app/extensions/engine_enterprise
|
||||
- ${ENTERPRISE_ENGINE:-/dev/null}:${ENTERPRISE_ENGINE_VOLUME_MOUNT_DEST_DIR:-/tmp/empty:ro}
|
||||
- ${SQLITE_DB_FILE:-/dev/null}:/var/lib/oncall/oncall.db
|
||||
# this is mounted for testing purposes. Some of the authorization tests
|
||||
# reference this file
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ class SlackChannelView(PublicPrimaryKeyMixin, mixins.ListModelMixin, mixins.Retr
|
|||
is_archived=False,
|
||||
)
|
||||
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ActionView(RateLimitHeadersMixin, PublicPrimaryKeyMixin, UpdateSerializerM
|
|||
if action_name:
|
||||
queryset = queryset.filter(name=action_name)
|
||||
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
||||
def perform_create(self, serializer):
|
||||
serializer.save()
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ class AlertView(RateLimitHeadersMixin, mixins.ListModelMixin, GenericViewSet):
|
|||
|
||||
queryset = self.serializer_class.setup_eager_loading(queryset)
|
||||
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class EscalationChainView(RateLimitHeadersMixin, ModelViewSet):
|
|||
if name is not None:
|
||||
queryset = queryset.filter(name=name)
|
||||
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
||||
def get_object(self):
|
||||
public_primary_key = self.kwargs["pk"]
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@ class SlackChannelView(RateLimitHeadersMixin, mixins.ListModelMixin, GenericView
|
|||
if channel_name:
|
||||
queryset = queryset.filter(name=channel_name)
|
||||
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
|
|
|||
|
|
@ -27,4 +27,4 @@ class TeamView(PublicPrimaryKeyMixin, RetrieveModelMixin, ListModelMixin, viewse
|
|||
queryset = self.request.auth.organization.teams.all()
|
||||
if name:
|
||||
queryset = queryset.filter(name=name)
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ class UserGroupView(RateLimitHeadersMixin, mixins.ListModelMixin, GenericViewSet
|
|||
).distinct()
|
||||
if slack_handle:
|
||||
queryset = queryset.filter(handle=slack_handle)
|
||||
return queryset
|
||||
return queryset.order_by("id")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ slack-export-viewer==1.1.4
|
|||
beautifulsoup4==4.12.2
|
||||
social-auth-app-django==5.0.0
|
||||
cryptography==38.0.4 # version 39.0.0 introduced an issue - https://stackoverflow.com/a/75053968/3902555
|
||||
pytest==7.1.3
|
||||
pytest==7.3.1
|
||||
pytest-django==4.5.2
|
||||
pytest_factoryboy==2.5.1
|
||||
factory-boy<3.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue