Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
test:
name: Test
needs: [build]
uses: codecov/gha-workflows/.github/workflows/run-tests-split.yml@v1.2.33
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.33
secrets: inherit
with:
run_integration: false
Expand Down
2,755 changes: 0 additions & 2,755 deletions .test_durations

This file was deleted.

24 changes: 4 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,10 @@ test:
COVERAGE_CORE=sysmon pytest --cov=./ --junitxml=junit.xml -o junit_family=legacy

test.unit:
@if [ -n "$(GROUP)" ]; then \
COVERAGE_CORE=sysmon pytest --splits ${SPLIT} --group $(GROUP) --cov=./ -m "not integration" --cov-report=xml:unit.$(GROUP).coverage.xml --junitxml=unit.$(GROUP).junit.xml -o junit_family=legacy; \
else \
COVERAGE_CORE=sysmon pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml --junitxml=unit.junit.xml -o junit_family=legacy; \
fi
COVERAGE_CORE=sysmon pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml --junitxml=unit.junit.xml -o junit_family=legacy

test.integration:
@if [ -n "$(GROUP)" ]; then \
COVERAGE_CORE=sysmon pytest --splits ${SPLIT} --group $(GROUP) --cov=./ -m "integration" --cov-report=xml:integration.$(GROUP).coverage.xml --junitxml=integration.$(GROUP).junit.xml -o junit_family=legacy; \
else \
COVERAGE_CORE=sysmon pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml --junitxml=integration.junit.xml -o junit_family=legacy; \
fi
COVERAGE_CORE=sysmon pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml --junitxml=integration.junit.xml -o junit_family=legacy

lint:
make lint.install
Expand Down Expand Up @@ -219,18 +211,10 @@ test_env.container_check_db:
while ! nc -vz timescale 5432; do sleep 1; echo "waiting for timescale"; done

test_env.run_unit:
@if [ -n "$(GROUP)" ]; then \
docker compose exec api make test.unit SPLIT=${SPLIT} GROUP=${GROUP}; \
else \
docker compose exec api make test.unit; \
fi
docker compose exec api make test.unit

test_env.run_integration:
# @if [ -n "$(GROUP)" ]; then \
# docker compose exec api make test.integration SPLIT=${SPLIT} GROUP=${GROUP}; \
# else \
# docker compose exec api make test.integration; \
# fi
# docker compose exec api make test.integration
echo "Skipping. No Tests"

test_env.check-for-migration-conflicts:
Expand Down
17 changes: 6 additions & 11 deletions graphql_api/tests/mutation/test_delete_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@
class DeleteSessionTestCase(GraphQLTestHelper, TransactionTestCase):
def setUp(self):
self.owner = OwnerFactory(username="codecov-user")
user = self.user = UserFactory()
self.owner.user = user
self.owner.save()

# clear pre-existing login sessions, as some testcase seems to leak these
DjangoSession.objects.all().delete()

def test_when_unauthenticated(self):
data = self.gql_request(query, variables={"input": {"sessionid": 1}})
assert data["deleteSession"]["error"]["__typename"] == "UnauthenticatedError"

def test_when_authenticated(self):
user = UserFactory()
self.owner.user = user
self.owner.save()

django_session_id = DjangoSession.objects.all()
assert len(django_session_id) == 0

login_query = "{ me { user { username }} }"
self.gql_request(login_query, owner=self.owner)

Expand All @@ -59,10 +58,6 @@ def test_when_authenticated(self):
assert len(Session.objects.filter(sessionid=sessionid)) == 0

def test_when_authenticated_session_not_valid(self):
user = UserFactory()
self.owner.user = user
self.owner.save()

login_query = "{ me { user { username }} }"
self.gql_request(login_query, owner=self.owner)

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ dev-dependencies = [
"pytest-django==4.8.0",
"pytest-insta>=0.3.0",
"pytest-mock==3.14.0",
"pytest-split==0.10.0",
"urllib3==1.26.19",
"vcrpy>=6.0.1",
"ruff>=0.9.6",
Expand Down
15 changes: 1 addition & 14 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading