Bug #16712

Run tests for tails-weblate-update.hook

Added by hefee 2019-05-08 15:06:53 . Updated 2019-09-13 09:30:11 .

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

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:

Starter:
Affected tool:
Translation Platform
Deliverable for:

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.


Subtasks


Related issues

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

History

#1 Updated by hefee 2019-05-08 15:07:21

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

#2 Updated by hefee 2019-05-24 18:24:05

  • Status changed from New to Confirmed

#3 Updated by intrigeri 2019-06-01 12:40:40

> 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 2019-06-01 12:42:45

#5 Updated by intrigeri 2019-06-01 12:43:15

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

#6 Updated by intrigeri 2019-06-01 12:43:53

> Blocked by Bug 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 2019-06-03 09:33:37

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 2019-09-13 09:30:11