Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit b4563c1

Browse files
authored
Revert split tests (#1213)
1 parent 837aaa0 commit b4563c1

File tree

6 files changed

+12
-2802
lines changed

6 files changed

+12
-2802
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
test:
4141
name: Test
4242
needs: [build]
43-
uses: codecov/gha-workflows/.github/workflows/run-tests-split[email protected]
43+
uses: codecov/gha-workflows/.github/workflows/[email protected]
4444
secrets: inherit
4545
with:
4646
run_integration: false

.test_durations

-2,755
This file was deleted.

Makefile

+4-20
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,10 @@ test:
3333
COVERAGE_CORE=sysmon pytest --cov=./ --junitxml=junit.xml -o junit_family=legacy
3434

3535
test.unit:
36-
@if [ -n "$(GROUP)" ]; then \
37-
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; \
38-
else \
39-
COVERAGE_CORE=sysmon pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml --junitxml=unit.junit.xml -o junit_family=legacy; \
40-
fi
36+
COVERAGE_CORE=sysmon pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml --junitxml=unit.junit.xml -o junit_family=legacy
4137

4238
test.integration:
43-
@if [ -n "$(GROUP)" ]; then \
44-
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; \
45-
else \
46-
COVERAGE_CORE=sysmon pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml --junitxml=integration.junit.xml -o junit_family=legacy; \
47-
fi
39+
COVERAGE_CORE=sysmon pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml --junitxml=integration.junit.xml -o junit_family=legacy
4840

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

221213
test_env.run_unit:
222-
@if [ -n "$(GROUP)" ]; then \
223-
docker compose exec api make test.unit SPLIT=${SPLIT} GROUP=${GROUP}; \
224-
else \
225-
docker compose exec api make test.unit; \
226-
fi
214+
docker compose exec api make test.unit
227215

228216
test_env.run_integration:
229-
# @if [ -n "$(GROUP)" ]; then \
230-
# docker compose exec api make test.integration SPLIT=${SPLIT} GROUP=${GROUP}; \
231-
# else \
232-
# docker compose exec api make test.integration; \
233-
# fi
217+
# docker compose exec api make test.integration
234218
echo "Skipping. No Tests"
235219

236220
test_env.check-for-migration-conflicts:

graphql_api/tests/mutation/test_delete_session.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@
2020
class DeleteSessionTestCase(GraphQLTestHelper, TransactionTestCase):
2121
def setUp(self):
2222
self.owner = OwnerFactory(username="codecov-user")
23+
user = self.user = UserFactory()
24+
self.owner.user = user
25+
self.owner.save()
26+
27+
# clear pre-existing login sessions, as some testcase seems to leak these
28+
DjangoSession.objects.all().delete()
2329

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

2834
def test_when_authenticated(self):
29-
user = UserFactory()
30-
self.owner.user = user
31-
self.owner.save()
32-
33-
django_session_id = DjangoSession.objects.all()
34-
assert len(django_session_id) == 0
35-
3635
login_query = "{ me { user { username }} }"
3736
self.gql_request(login_query, owner=self.owner)
3837

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

6160
def test_when_authenticated_session_not_valid(self):
62-
user = UserFactory()
63-
self.owner.user = user
64-
self.owner.save()
65-
6661
login_query = "{ me { user { username }} }"
6762
self.gql_request(login_query, owner=self.owner)
6863

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ dev-dependencies = [
7272
"pytest-django==4.8.0",
7373
"pytest-insta>=0.3.0",
7474
"pytest-mock==3.14.0",
75-
"pytest-split==0.10.0",
7675
"urllib3==1.26.19",
7776
"vcrpy>=6.0.1",
7877
"ruff>=0.9.6",

uv.lock

+1-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)