Skip to content

Commit 132845a

Browse files
committed
revert: Use generic patterns in integration tests without version constraints
- Revert exact version assertions where UpdateDependency gets latest version - Keep generic patterns \d+\.\d+\.\d+ and [a-f0-9]{40} for future-proof tests - Integration tests call UpdateDependency without pattern constraints - Latest version will change over time (0.11.0 → 0.12.0, etc.) - Unit tests can keep exact values since they specify exact versions
1 parent d7e850f commit 132845a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

updater/tests/update-dependency.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ FetchContent_MakeAvailable(sentry-native)
275275

276276
$content = Get-Content $testFile -Raw
277277
$content | Should -Not -Match 'v0.9.1'
278-
$content | Should -Match 'GIT_TAG 0\.11\.0'
278+
$content | Should -Match 'GIT_TAG \d+\.\d+\.\d+'
279279
$content | Should -Match 'GIT_REPOSITORY https://github.com/getsentry/sentry-native'
280280
}
281281

@@ -298,7 +298,7 @@ FetchContent_MakeAvailable(sentry-native)
298298

299299
$content = Get-Content $testFile -Raw
300300
$content | Should -Not -Match 'v0.9.0'
301-
$content | Should -Match 'GIT_TAG 0\.11\.0'
301+
$content | Should -Match 'GIT_TAG \d+\.\d+\.\d+'
302302
}
303303

304304
It 'updates from hash to newer tag preserving hash format' {
@@ -320,7 +320,7 @@ FetchContent_MakeAvailable(sentry-native)
320320

321321
$content = Get-Content $testFile -Raw
322322
# Should update to a new hash with tag comment
323-
$content | Should -Match 'GIT_TAG 3bd091313ae97be90be62696a2babe591a988eb8 # 0\.11\.0'
323+
$content | Should -Match 'GIT_TAG [a-f0-9]{40} # \d+\.\d+\.\d+'
324324
$content | Should -Not -Match 'a64d5bd8ee130f2cda196b6fa7d9b65bfa6d32e2'
325325
}
326326

0 commit comments

Comments
 (0)