Ensure that the upgraded version is really greater

This commit is contained in:
2022-03-28 14:47:21 +02:00
parent daf8907f14
commit 16f1d63c8d
4 changed files with 28 additions and 4 deletions

View File

@@ -34,3 +34,19 @@ func TestDownloadLatestRelease(t *testing.T) {
t.Errorf("Error: %s", err)
}
}
func TestAlreadyUpToDate(t *testing.T) {
Version = "99999.999.99"
exe = "/tmp/test-katenary"
defer os.Remove(exe)
// Call the version check
version, _, err := CheckLatestVersion()
if err == nil {
t.Errorf("Error: %s", err)
}
t.Log("Version is already the most recent", version)
}