Skip to content

Commit a46450d

Browse files
authored
chore: fix cleanup of service test branches (#3151)
1 parent 473e5d1 commit a46450d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/service/fixtures/service_integration.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ def svc_client_setup(integration_lifecycle):
137137
# NOTE: Some tests delete the repo
138138
repository.checkout("master")
139139
repository.branches.remove(current, force=True)
140+
try:
141+
# NOTE: try to delete remote branch in case there was a push
142+
repository.push(remote="origin", refspec=new_branch, delete=True)
143+
except: # noqa: E722
144+
pass
140145

141146

142147
@pytest.fixture

0 commit comments

Comments
 (0)