Project

General

Profile

Bug #16712

Run tests for tails-weblate-update.hook

Added by hefee 7 months ago. Updated 3 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:
Translation Platform

Description

I added tests for tails-weblate-update.hook in files/gitolite/hooks/tests. IMO we should run those tests by Jenkins and/or with puppet.

Initially I thought, that we only can run the tests, if the file has a .py suffix. But enrico showed a way to solve this.


Related issues

Blocked by Tails - Bug #15402: update hook for Main git when handling push from weblate Resolved

History

#1 Updated by hefee 7 months ago

Another question: Is it fine to keep the tests in puppet-tails?

#2 Updated by hefee 7 months ago

  • Status changed from New to Confirmed

#3 Updated by intrigeri 7 months ago

Another question: Is it fine to keep the tests in puppet-tails?

Yes, as long as all our Weblate integration code is in that repo, it makes sense for the hook and its tests to live there as well.

IMO we should run those tests by Jenkins and/or with puppet.

We could run this either in Jenkins (cheapest option at the moment), or Salsa (nicer UX but more work), or as a Git hook that runs when pushing to puppet-tails.git; of course, only the latter would prevent us from pushing regressions. I don't think Puppet is a suitable tool to run automated tests, given how/where it'll report failure. Let's forget about this option.

I'm fine with doing whatever fits in the budget once we have a production ready setup; and if it does not fit, too bad (so I'll adjust the metadata of this ticket accordingly). Once we're there, I'll need you to tell me what set of commands (that return 0 iff. success) and dependencies are needed to run the tests.

#4 Updated by intrigeri 7 months ago

  • Parent task changed from #15402 to #10034

#5 Updated by intrigeri 7 months ago

  • Blocked by Bug #15402: update hook for Main git when handling push from weblate added

#6 Updated by intrigeri 7 months ago

Blocked by Bug #15402: Pre-receive hook for Main git when handling pushs from weblate added

(Because we can't test stuff that's not in our code base yet.)

#7 Updated by hefee 6 months ago

intrigeri wrote:

Another question: Is it fine to keep the tests in puppet-tails?

Yes, as long as all our Weblate integration code is in that repo, it makes sense for the hook and its tests to live there as well.

IMO we should run those tests by Jenkins and/or with puppet.

We could run this either in Jenkins (cheapest option at the moment), or Salsa (nicer UX but more work), or as a Git hook that runs when pushing to puppet-tails.git; of course, only the latter would prevent us from pushing regressions. I don't think Puppet is a suitable tool to run automated tests, given how/where it'll report failure. Let's forget about this option.

I'm fine with doing whatever fits in the budget once we have a production ready setup; and if it does not fit, too bad (so I'll adjust the metadata of this ticket accordingly). Once we're there, I'll need you to tell me what set of commands (that return 0 iff. success) and dependencies are needed to run the tests.

cd files/gitolite/hooks && python3 -m nose

dependencies:

  • python3
  • python3-nose

#8 Updated by intrigeri 3 months ago

  • Parent task deleted (#10034)

Also available in: Atom PDF