This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new ac534b8 Fix LICENSE and NOTICE formatting, and add browser tests for
license checks
ac534b8 is described below
commit ac534b84fd866413e57727614aae089467685999
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Apr 15 14:24:54 2025 +0100
Fix LICENSE and NOTICE formatting, and add browser tests for license checks
---
LICENSE | 1 +
NOTICE | 2 +-
.../apache-tooling-test-example-0.2.tar.gz | Bin 4416 -> 4408 bytes
.../apache-tooling-test-example-0.2.tar.gz.sha512 | 2 +-
playwright/test.py | 69 ++++++++++++++++++++-
5 files changed, 70 insertions(+), 4 deletions(-)
diff --git a/LICENSE b/LICENSE
index 261eeb9..d645695 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,4 @@
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
diff --git a/NOTICE b/NOTICE
index 235cb07..4bcd1ac 100644
--- a/NOTICE
+++ b/NOTICE
@@ -2,7 +2,7 @@ Apache Trusted Release (ATR)
Copyright 2025 The Apache Software Foundation
-This product includes experimental software developed at
+This product includes software developed at
The Apache Software Foundation (/).
This code is provided for evaluation, demonstration, and
diff --git
a/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz
b/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz
index 1c1ea36..1450508 100644
Binary files
a/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz
and
b/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz
differ
diff --git
a/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz.sha512
b/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz.sha512
index 0d246e2..d57f986 100644
---
a/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz.sha512
+++
b/playwright/apache-tooling-test-example-0.2/apache-tooling-test-example-0.2.tar.gz.sha512
@@ -1 +1 @@
-7262935d3127abe6f3fda6457429e41fa68077537c7bcbb4c4c1f7a6642f8adb960bfce4de3236fde93ece1fd77ace49f42c5adc2a636820a4cd4934fe576f58
apache-tooling-test-example-0.2.tar.gz
+9973b48f7e2424621d865a2f9a139fd0da3b63cd2ec240a86e1ede914d524c4d5c95c79bc84c1da2b3d7e41463bb133188fe45b34fc095dd3e1c08a508ccd101
apache-tooling-test-example-0.2.tar.gz
diff --git a/playwright/test.py b/playwright/test.py
index cacfc81..3a8ec1b 100644
--- a/playwright/test.py
+++ b/playwright/test.py
@@ -25,6 +25,7 @@ import os
import re
import socket
import subprocess
+import time
import urllib.parse
from collections.abc import Callable
from typing import Any, Final
@@ -260,7 +261,9 @@ def test_all(page: sync_api.Page, credentials: Credentials,
skip_slow: bool) ->
test_ssh_02_rsync_upload,
]
tests["checks"] = [
- test_checks_hashing_01_sha512,
+ test_checks_01_hashing_sha512,
+ test_checks_02_license_files,
+ test_checks_03_license_headers,
]
# Order between our tests must be preserved
@@ -270,7 +273,7 @@ def test_all(page: sync_api.Page, credentials: Credentials,
skip_slow: bool) ->
run_tests_skipping_slow(tests[key], page, credentials, skip_slow)
-def test_checks_hashing_01_sha512(page: sync_api.Page, credentials:
Credentials) -> None:
+def test_checks_01_hashing_sha512(page: sync_api.Page, credentials:
Credentials) -> None:
project_name = "tooling-test-example"
version_name = "0.2"
filename_sha512 = f"apache-{project_name}-{version_name}.tar.gz.sha512"
@@ -305,6 +308,65 @@ def test_checks_hashing_01_sha512(page: sync_api.Page,
credentials: Credentials)
logging.info("Hashing Check status verified as Passed")
+def test_checks_02_license_files(page: sync_api.Page, credentials:
Credentials) -> None:
+ project_name = "tooling-test-example"
+ version_name = "0.2"
+ filename_targz = f"apache-{project_name}-{version_name}.tar.gz"
+ evaluate_page_path = f"/draft/evaluate/{project_name}/{version_name}"
+ evaluate_file_path = f"{evaluate_page_path}/{filename_targz}"
+
+ logging.info(f"Starting License Files check test for {filename_targz}")
+
+ logging.info(f"Navigating to evaluate page {evaluate_page_path}")
+ go_to_path(page, evaluate_page_path)
+
+ logging.info(f"Locating 'Evaluate file' link for {filename_targz}")
+ row_locator = page.locator(f"tr:has(:text('{filename_targz}'))")
+ evaluate_link_title = f"Evaluate file {filename_targz}"
+ evaluate_link_locator =
row_locator.locator(f'a[title="{evaluate_link_title}"]')
+ sync_api.expect(evaluate_link_locator).to_be_visible()
+
+ logging.info(f"Clicking 'Evaluate file' link for {filename_targz}")
+ evaluate_link_locator.click()
+
+ logging.info(f"Waiting for navigation to {evaluate_file_path}")
+ wait_for_path(page, evaluate_file_path)
+ logging.info(f"Successfully navigated to {evaluate_file_path}")
+
+ logging.info("Verifying License Files check status")
+ license_check_div_locator =
page.locator("div.border:has(span.fw-bold:text-is('License Files'))")
+ sync_api.expect(license_check_div_locator).to_be_visible()
+ logging.info("Located License Files check block")
+
+ passed_badge_locator =
license_check_div_locator.locator("span.badge.bg-success:text-is('Passed')")
+ sync_api.expect(passed_badge_locator).to_be_visible()
+ logging.info("License Files check status verified as Passed")
+
+
+def test_checks_03_license_headers(page: sync_api.Page, credentials:
Credentials) -> None:
+ project_name = "tooling-test-example"
+ version_name = "0.2"
+ filename_targz = f"apache-{project_name}-{version_name}.tar.gz"
+ evaluate_page_path = f"/draft/evaluate/{project_name}/{version_name}"
+ evaluate_file_path = f"{evaluate_page_path}/{filename_targz}"
+
+ logging.info(f"Starting License Headers check test for {filename_targz}")
+
+ # Don't repeat the link test, just go straight there
+ logging.info(f"Navigating to evaluate file page {evaluate_file_path}")
+ go_to_path(page, evaluate_file_path)
+ logging.info(f"Successfully navigated to {evaluate_file_path}")
+
+ logging.info("Verifying License Headers check status")
+ header_check_div_locator =
page.locator("div.border:has(span.fw-bold:text-is('License Headers'))")
+ sync_api.expect(header_check_div_locator).to_be_visible()
+ logging.info("Located License Headers check block")
+
+ passed_badge_locator =
header_check_div_locator.locator("span.badge.bg-success:text-is('Passed')")
+ sync_api.expect(passed_badge_locator).to_be_visible()
+ logging.info("License Headers check status verified as Passed")
+
+
def test_lifecycle_01_add_draft(page: sync_api.Page, credentials: Credentials)
-> None:
logging.info("Following link to add draft")
add_draft_link_locator = page.get_by_role("link", name="Add draft")
@@ -723,6 +785,9 @@ def test_ssh_02_rsync_upload(page: sync_api.Page,
credentials: Credentials) -> N
logging.info(f"Found file: {file2}")
logging.info("rsync upload test completed successfully")
+ # TODO: We need to wait for checks, but we should poll instead
+ time.sleep(2)
+
def test_tidy_up(page: sync_api.Page) -> None:
# Projects cannot be deleted if they have associated releases
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]