From 54d66d9dc8876e93a05e4e02eccb546c9ba0dce2 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Mon, 11 May 2026 11:06:58 +0200 Subject: [PATCH] test(updater): Accept either main or master as sentry-cli main branch The `writes output` / `writes to env:GITHUB_OUTPUT` tests assert against the live state of getsentry/sentry-cli via `git ls-remote`. Whether the script reports `main` or `master` depends on which of the two currently points at the upstream HEAD, which flips over time. PR #165 baked `main` into the assertion while both happened to point at HEAD; sentry-cli has since diverged and post-merge CI on main now reports `master`, failing the test. Accept either branch name so the test isn't coupled to transient upstream branch state. --- updater/tests/update-dependency.Tests.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/updater/tests/update-dependency.Tests.ps1 b/updater/tests/update-dependency.Tests.ps1 index a7a1578..4690804 100644 --- a/updater/tests/update-dependency.Tests.ps1 +++ b/updater/tests/update-dependency.Tests.ps1 @@ -220,7 +220,9 @@ switch ($action) $output | Should -Contain 'latestTag=0.28.0' $output | Should -Contain 'latestTagNice=v0.28.0' $output | Should -Contain 'url=https://github.com/getsentry/sentry-cli' - $output | Should -Contain 'mainBranch=main' + # sentry-cli has both `main` and `master`; which one is reported depends on + # which currently points at HEAD upstream, so accept either. + ($output | Where-Object { $_ -like 'mainBranch=*' }) | Should -BeIn @('mainBranch=main', 'mainBranch=master') } }