Skip to content

Commit

Permalink
frontend: pick the outdated chroot more deterministically
Browse files Browse the repository at this point in the history
See fedora-copr#3130

For some reason the order of `[x.name for x in self.c3.copr_chroots]`
is different SQLAlchemy 1 and 2.

F39:

    ['fedora-18-x86_64', 'fedora-rawhide-i386']

F40:

    ['fedora-rawhide-i386', 'fedora-18-x86_64']
  • Loading branch information
FrostyX authored and praiskup committed Mar 7, 2024
1 parent 94c5c16 commit 5bb2250
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/coprs_frontend/tests/test_apiv3/test_rpmrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ def test_apiv3_rpmrepo_external_deps(self):
# both 'foo' and 'foo:pr:11' give the same output.

self.c3.delete_after = datetime.now() + timedelta(days=180)
self.c3.copr_chroots[0].deleted = True
self.c3.copr_chroots[0].delete_after = \
datetime.now() + timedelta(days=10)
for chroot in self.c3.copr_chroots:
if chroot.name == "fedora-18-x86_64":
chroot.deleted = True
chroot.delete_after = datetime.now() + timedelta(days=10)
self.db.session.commit()

for dirname in [self.c3.name, self.c3.name + ':pr:11']:
Expand Down

0 comments on commit 5bb2250

Please sign in to comment.