Use same arguments names if possible between many hooks, so multihook
tests may easily adapt on serving multiple hooks.
---
hooks/post-bodhi-update/README | 6 +++---
hooks/post-bodhi-update/hook.py | 6 +++---
hooks/post-koji-build/README | 4 ++--
hooks/post-repo-update/README | 2 +-
hooks/post-repo-update/hook.py | 2 +-
hooks/post-tree-compose/README | 2 +-
hooks/post-tree-compose/hook.py | 2 +-
tests/conflicts/conflicts.py | 10 +++++-----
tests/rats_install/rats_install.py | 10 +++++-----
tests/rats_sanity/rats_sanity.py | 10 +++++-----
tests/repoclosure/repoclosure.py | 10 +++++-----
11 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/hooks/post-bodhi-update/README b/hooks/post-bodhi-update/README
index e8bbf0c..449bc5b 100644
--- a/hooks/post-bodhi-update/README
+++ b/hooks/post-bodhi-update/README
@@ -13,7 +13,7 @@ plus one of:
and finally a list of the ENVRs of the package builds in this update.
AutoQA tests can expect the following variables from post-bodhi-update hook:
- title: title of the update request
- updateid: Unique ID of the update request (may be empty)
- targettag: target koji tag for this update
+ name: title of the update request
+ id: Unique ID of the update request (may be empty)
+ kojitag: target koji tag for this update
envrs: list of package envrs in this update request
diff --git a/hooks/post-bodhi-update/hook.py b/hooks/post-bodhi-update/hook.py
index 0ee26ea..c203739 100644
--- a/hooks/post-bodhi-update/hook.py
+++ b/hooks/post-bodhi-update/hook.py
@@ -42,7 +42,7 @@ def process_testdata(opts, args, **extra):
OptionParser.parse_args()), return a dict containing the appropriate key=val
pairs required by test's control files and test object.'''
testdata = {'envrs': args,
- 'targettag': opts.targettag,
- 'updateid': opts.updateid,
- 'title': opts.title}
+ 'kojitag': opts.targettag,
+ 'id': opts.updateid,
+ 'name': opts.title}
return testdata
diff --git a/hooks/post-koji-build/README b/hooks/post-koji-build/README
index e4e3cc2..5cc8844 100644
--- a/hooks/post-koji-build/README
+++ b/hooks/post-koji-build/README
@@ -3,9 +3,9 @@ This hook is for scripts that run after a package is built in koji.
These tests usually do things like comparing the new package to the old package
to ensure the changes are reasonable, simple functional tests, etc.
-The required arguments are yet to be determined. FIXME.
+The required argument for autoqa is ENVR of the package to be tested.
AutoQA tests can expect the following variables from post-koji-build hook:
- envr: package ENVR (required, epoch can be skipped)
+ envr: package ENVR (required, epoch can be skipped if 0)
name: package name
kojitag: koji tag applied to this package
diff --git a/hooks/post-repo-update/README b/hooks/post-repo-update/README
index 9f033c7..9b4a0ce 100644
--- a/hooks/post-repo-update/README
+++ b/hooks/post-repo-update/README
@@ -13,4 +13,4 @@ arches when the tests are actually run.
AutoQA tests can expect the following variables from post-repo-update hook:
baseurl: url of repo that changed
parents: list of urls for 'parent' repos of the given repo
- reponame: name for repo that changed, may be empty
+ name: name for repo that changed, may be empty
diff --git a/hooks/post-repo-update/hook.py b/hooks/post-repo-update/hook.py
index 04258a0..cd63152 100644
--- a/hooks/post-repo-update/hook.py
+++ b/hooks/post-repo-update/hook.py
@@ -40,5 +40,5 @@ def process_testdata(opts, args, **extra):
pairs required by test's control files and test object.'''
testdata = {'baseurl': args[0],
'parents': opts.parent,
- 'reponame': opts.name or ''}
+ 'name': opts.name or ''}
return testdata
diff --git a/hooks/post-tree-compose/README b/hooks/post-tree-compose/README
index 3a0ce76..8707b84 100644
--- a/hooks/post-tree-compose/README
+++ b/hooks/post-tree-compose/README
@@ -12,4 +12,4 @@ a very fast link.
AutoQA tests can expect the following variables from post-tree-compose hook:
baseurl: url of the new tree
- treename: name for the new tree, may be empty
+ name: name for the new tree, may be empty
diff --git a/hooks/post-tree-compose/hook.py b/hooks/post-tree-compose/hook.py
index 66aaa6c..c71f594 100644
--- a/hooks/post-tree-compose/hook.py
+++ b/hooks/post-tree-compose/hook.py
@@ -25,5 +25,5 @@ def process_testdata(opts, args, arch, **extra):
OptionParser.parse_args()), return a dict containing the appropriate key=val
pairs required by test's control files and test object.'''
testdata = {'baseurl': args[0],
- 'treename': opts.name or ''}
+ 'name': opts.name or ''}
return testdata
diff --git a/tests/conflicts/conflicts.py b/tests/conflicts/conflicts.py
index 5d034a7..b2d003c 100644
--- a/tests/conflicts/conflicts.py
+++ b/tests/conflicts/conflicts.py
@@ -33,11 +33,11 @@ class conflicts(AutoQATest):
f.close()
@ExceptionCatcher("self.run_once_failed")
- def run_once(self, baseurl, parents, reponame, **kwargs):
- if reponame:
- reponame = "%s-%s" % (reponame, autoqa.util.get_basearch())
+ def run_once(self, baseurl, parents, name, **kwargs):
+ if name:
+ name = "%s-%s" % (name, autoqa.util.get_basearch())
else:
- reponame = baseurl
+ name = baseurl
os.chdir(self.bindir)
cmd = './potential_conflict.py --tempcache --newest'
cmd += ' --repofrompath=target,%s --repoid=target' % baseurl
@@ -72,7 +72,7 @@ class conflicts(AutoQATest):
else:
self.result = "FAILED"
- self.summary = "%u packages with file conflicts in %s" %
(len(conflicting_pkgs), reponame)
+ self.summary = "%u packages with file conflicts in %s" %
(len(conflicting_pkgs), name)
self.highlights = "= Conflicting pkgs =\n%s" %
"\n".join(sorted(conflicting_pkgs))
self.highlights += "\n\n= File conflicts =\n%s" %
"\n".jouin(sorted(file_conflicts))
self.outputs = out
diff --git a/tests/rats_install/rats_install.py b/tests/rats_install/rats_install.py
index c57c04c..21c95de 100644
--- a/tests/rats_install/rats_install.py
+++ b/tests/rats_install/rats_install.py
@@ -50,11 +50,11 @@ class rats_install(AutoQATest):
utils.system('lokkit --disabled')
@ExceptionCatcher("self.run_once_failed")
- def run_once(self, baseurl, treename, image_url="", boot_args="",
**kwargs):
- if treename:
- treename = "%s-%s" % (treename, util.get_basearch())
+ def run_once(self, baseurl, name, image_url="", boot_args="",
**kwargs):
+ if name:
+ name = "%s-%s" % (name, util.get_basearch())
else:
- treename = baseurl
+ name = baseurl
os.chdir(self.bindir)
cmd = "./install.py -s %s -l %s" % (self.tmpdir, self.resultsdir)
if image_url != "":
@@ -71,7 +71,7 @@ class rats_install(AutoQATest):
if self.result is None:
self.result = "PASSED"
- self.summary = "%s" % (treename)
+ self.summary = "%s" % (name)
self.highlights = None
self.outputs = out
diff --git a/tests/rats_sanity/rats_sanity.py b/tests/rats_sanity/rats_sanity.py
index 4118baa..1da8e32 100644
--- a/tests/rats_sanity/rats_sanity.py
+++ b/tests/rats_sanity/rats_sanity.py
@@ -37,11 +37,11 @@ class rats_sanity(AutoQATest):
utils.system('yum -y install python-fedora')
@ExceptionCatcher("self.run_once_failed")
- def run_once(self, baseurl, parents, reponame, **kwargs):
- if reponame:
- reponame = "%s-%s" % (reponame, autoqa.util.get_basearch())
+ def run_once(self, baseurl, parents, name, **kwargs):
+ if name:
+ name = "%s-%s" % (name, autoqa.util.get_basearch())
else:
- reponame = baseurl
+ name = baseurl
os.chdir(self.bindir)
cmd = "./sanity.py -s %s -l %s" % (self.tmpdir, self.resultsdir)
cmd += " %s" % baseurl
@@ -54,7 +54,7 @@ class rats_sanity(AutoQATest):
if self.result is None:
self.result = "PASSED"
- self.summary = "%s" % (reponame)
+ self.summary = "%s" % (name)
self.highlights = None
self.outputs = out
diff --git a/tests/repoclosure/repoclosure.py b/tests/repoclosure/repoclosure.py
index ac21500..f3ffb8a 100644
--- a/tests/repoclosure/repoclosure.py
+++ b/tests/repoclosure/repoclosure.py
@@ -30,11 +30,11 @@ class repoclosure(AutoQATest):
utils.system('yum -y install yum-utils')
@ExceptionCatcher("self.run_once_failed")
- def run_once(self, baseurl, parents='', reponame='', **kwargs):
- if reponame:
- reponame = "%s-%s" % (reponame, autoqa.util.get_basearch())
+ def run_once(self, baseurl, parents='', name='', **kwargs):
+ if name:
+ name = "%s-%s" % (name, autoqa.util.get_basearch())
else:
- reponame = baseurl
+ name = baseurl
# build the repoclosure commandline
cmd = 'repoclosure --tempcache --newest'
cmd += ' --repofrompath=target,%s --repoid=target' % baseurl
@@ -53,7 +53,7 @@ class repoclosure(AutoQATest):
self.result = "FAILED"
else:
self.result = "PASSED"
- self.summary = '%u packages with unresolved deps in %s' %
(unresolved_count, reponame)
+ self.summary = '%u packages with unresolved deps in %s' %
(unresolved_count, name)
self.highlights = None
self.outputs = out
--
1.7.2.1