diff --git a/scripts/telemetry_adoption_report.py b/scripts/telemetry_adoption_report.py index 12a6565b10..e3e3f22f3b 100644 --- a/scripts/telemetry_adoption_report.py +++ b/scripts/telemetry_adoption_report.py @@ -473,13 +473,13 @@ def format_text(summary: dict[str, Any], repo: str, since_days: int) -> str: else: lines.append(" - none") lines.append("- aggregate adoption counts:") - adoption_counts = [entry for entry in window_summary["adoption_counts"] if entry["total"] > 0] + adoption_counts = [entry for entry in window_summary.get("adoption_counts", []) if entry["total"] > 0] if adoption_counts: lines.extend(f" - {entry['label']}: {entry['total']}" for entry in adoption_counts) else: lines.append(" - none") lines.append("- feature-enabled installs:") - feature_counts = [entry for entry in window_summary["feature_enabled_installs"] if entry["installs"] > 0] + feature_counts = [entry for entry in window_summary.get("feature_enabled_installs", []) if entry["installs"] > 0] if feature_counts: lines.extend(f" - {entry['label']}: {entry['installs']}" for entry in feature_counts) else: diff --git a/scripts/tests/test-hot-dev-auth.sh b/scripts/tests/test-hot-dev-auth.sh index 5d03aace77..eb05e0c3da 100755 --- a/scripts/tests/test-hot-dev-auth.sh +++ b/scripts/tests/test-hot-dev-auth.sh @@ -177,7 +177,7 @@ EOF key_line_count="$(grep -c "^PULSE_AUDIT_SIGNING_KEY=" "${RUNTIME_ENV_PATH}")" key_value="$(grep "^PULSE_AUDIT_SIGNING_KEY=" "${RUNTIME_ENV_PATH}" | cut -d= -f2- | tr -d "\\047")" key_file_value="$(cat "${DATA_DIR}/.audit-signing.key")" - mode="$(stat -f "%Lp" "${DATA_DIR}/.audit-signing.key" 2>/dev/null || stat -c "%a" "${DATA_DIR}/.audit-signing.key")" + mode="$(stat -c "%a" "${DATA_DIR}/.audit-signing.key" 2>/dev/null || stat -f "%Lp" "${DATA_DIR}/.audit-signing.key")" hot_dev_sync_audit_signing_env_file "${RUNTIME_ENV_PATH}" "${DATA_DIR}" key_line_count_after="$(grep -c "^PULSE_AUDIT_SIGNING_KEY=" "${RUNTIME_ENV_PATH}")" printf "key_line_count=%s\n" "${key_line_count}" diff --git a/scripts/tests/test-hot-dev-bg.sh b/scripts/tests/test-hot-dev-bg.sh index a44aa6dab9..526522f97a 100755 --- a/scripts/tests/test-hot-dev-bg.sh +++ b/scripts/tests/test-hot-dev-bg.sh @@ -726,7 +726,7 @@ test_hot_dev_auth_helper_seeds_deterministic_bootstrap_token() { rm -f "${DATA_DIR}/.bootstrap_token" hot_dev_sync_bootstrap_token_file "${DATA_DIR}" third="$(cat "${DATA_DIR}/.bootstrap_token")" - mode="$(stat -f "%Lp" "${DATA_DIR}/.bootstrap_token" 2>/dev/null || stat -c "%a" "${DATA_DIR}/.bootstrap_token")" + mode="$(stat -c "%a" "${DATA_DIR}/.bootstrap_token" 2>/dev/null || stat -f "%Lp" "${DATA_DIR}/.bootstrap_token")" printf "first=%s\n" "${first}" printf "second=%s\n" "${second}" printf "explicit=%s\n" "${explicit}" diff --git a/scripts/tests/test-toggle-mock.sh b/scripts/tests/test-toggle-mock.sh index 0fa1c41d06..93267e77cd 100755 --- a/scripts/tests/test-toggle-mock.sh +++ b/scripts/tests/test-toggle-mock.sh @@ -221,7 +221,7 @@ EOF assert_contains "ensure_mock_env_file migrates legacy mock mode" "${env_contents}" "PULSE_MOCK_MODE=true" assert_contains "ensure_mock_env_file migrates legacy node count" "${env_contents}" "PULSE_MOCK_NODES=9" - assert_contains "ensure_mock_env_file still seeds missing defaults" "${env_contents}" "PULSE_MOCK_VMS_PER_NODE=3" + assert_contains "ensure_mock_env_file still seeds missing defaults" "${env_contents}" "PULSE_MOCK_VMS_PER_NODE=6" } test_set_mock_mode_does_not_recreate_legacy_sidecars() {