← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~hyask/autopkgtest-cloud:skia/github_integration_fixes into autopkgtest-cloud:master

 

Skia has proposed merging ~hyask/autopkgtest-cloud:skia/github_integration_fixes into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/473433

More fixes for the Github integration, to work with `testname` parameter.
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~hyask/autopkgtest-cloud:skia/github_integration_fixes into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/request/app.py b/charms/focal/autopkgtest-web/webcontrol/request/app.py
index 6f86009..89d8f47 100644
--- a/charms/focal/autopkgtest-web/webcontrol/request/app.py
+++ b/charms/focal/autopkgtest-web/webcontrol/request/app.py
@@ -234,11 +234,12 @@ def index_root():
             os.path.join(
                 PATH,
                 "github-pending",
-                "%s-%s-%s-%s-%s"
+                "%s-%s-%s-%s-%s-%s"
                 % (
                     params["release"],
                     params["arch"],
                     params["package"],
+                    params.get("testname", ""),
                     github_params["number"],
                     os.path.basename(statuses_url),
                 ),
diff --git a/charms/focal/autopkgtest-web/webcontrol/request/tests/test_app.py b/charms/focal/autopkgtest-web/webcontrol/request/tests/test_app.py
index 6acb948..ff7ec50 100644
--- a/charms/focal/autopkgtest-web/webcontrol/request/tests/test_app.py
+++ b/charms/focal/autopkgtest-web/webcontrol/request/tests/test_app.py
@@ -358,7 +358,7 @@ class GitHubRequestTests(AppTestBase):
         # we recorded the request
         request.app.open.assert_called_with(
             os.path.join(
-                request.app.PATH, "github-pending", "testy-C51-hi-2-two"
+                request.app.PATH, "github-pending", "testy-C51-hi--2-two"
             ),
             "w",
         )
@@ -584,7 +584,7 @@ class GitHubRequestTests(AppTestBase):
         # we recorded the request
         request.app.open.assert_called_with(
             os.path.join(
-                request.app.PATH, "github-pending", "testy-C51-hi-2-two"
+                request.app.PATH, "github-pending", "testy-C51-hi-first-2-two"
             ),
             "w",
         )
diff --git a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
index 4ecb17a..afc4f67 100755
--- a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
+++ b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
@@ -142,6 +142,7 @@ def is_job_running(params):
         params["release"],
         params["build-git"],
         params["ppas"],
+        params.get("testname", ""),
         get_upstream_pr_from_env(params["env"]),
     )
 
@@ -159,6 +160,7 @@ def is_job_running(params):
                     release,
                     test_params["build-git"],
                     test_params["ppas"],
+                    test_params.get("testname", ""),
                     get_upstream_pr_from_env(test_params["env"]),
                 )
                 if this_test == job_match_me: