Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

test(updates): pin release fixtures independently of source identity

pulse-triage[bot]f0eb44433030
diff --git a/internal/updates/manager_check_updates_test.go b/internal/updates/manager_check_updates_test.go
index 55ba5b422b..3e5d1abbc8 100644
--- a/internal/updates/manager_check_updates_test.go
+++ b/internal/updates/manager_check_updates_test.go
@@ -31,6 +31,8 @@ func newReleaseServer(t *testing.T, releases []ReleaseInfo, hitCount *int32) *ht
}
func TestCheckForUpdatesWithChannel_UsesConfiguredRepoPath(t *testing.T) {
+ // Exercise published-release behaviour independently of the checkout identity.
+ withBuildVersion(t, "6.4.0")
var hits int32
releases := []ReleaseInfo{
{
@@ -80,6 +82,8 @@ func TestCheckForUpdatesWithChannel_SourceBuild(t *testing.T) {
}
func TestCheckForUpdatesWithChannel_AvailableUsesCache(t *testing.T) {
+ // Exercise published-release behaviour independently of the checkout identity.
+ withBuildVersion(t, "6.4.0")
var hits int32
releaseTime := time.Date(2024, 1, 2, 3, 4, 5, 0, time.UTC)
releases := []ReleaseInfo{
@@ -132,6 +136,8 @@ func TestCheckForUpdatesWithChannel_AvailableUsesCache(t *testing.T) {
}
func TestCheckForUpdatesWithChannel_NoReleases(t *testing.T) {
+ // Exercise published-release behaviour independently of the checkout identity.
+ withBuildVersion(t, "6.4.0")
var hits int32
releases := []ReleaseInfo{
{
@@ -162,6 +168,8 @@ func TestCheckForUpdatesWithChannel_NoReleases(t *testing.T) {
}
func TestCheckForUpdates_Wrapper(t *testing.T) {
+ // Exercise published-release behaviour independently of the checkout identity.
+ withBuildVersion(t, "6.4.0")
var hits int32
releases := []ReleaseInfo{
{
@@ -199,6 +207,8 @@ func TestCheckForUpdates_Wrapper(t *testing.T) {
}
func TestForcedUpdateCheckRefreshesSavedChannelCache(t *testing.T) {
+ // Exercise published-release behaviour independently of the checkout identity.
+ withBuildVersion(t, "6.4.0")
var hits int32
server := newReleaseServer(t, []ReleaseInfo{{TagName: "v99.0.0", Assets: []ReleaseAsset{{Name: "pulse-v99.0.0-linux-amd64.tar.gz", BrowserDownloadURL: "https://example.com/new.tar.gz"}}}}, &hits)
defer server.Close()