forgejo/modules/updatechecker/update_checker_test.go
Gusted 8304af1e9d
[PRIVACY] Add a DNS method to fetch new updates
- Use TXT records in order to determine the latest available version.
- This addresses a valid privacy issue, as with HTTP requests the server
can keep track(estimated) of how many instances are using Forgejo, with
DNS that's basically not possible as the server will never receive any
data, as the only ones receiving data are DNS resolvers.

(cherry picked from commit 0baefb546a)
(cherry picked from commit e8ee41880b)
(cherry picked from commit 7eca4f3bf1)
(cherry picked from commit 6dde3992dc)
(cherry picked from commit fb3a37fbfc)
2023-03-18 10:27:24 +01:00

17 lines
322 B
Go

// Copyright 2023 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package updatechecker
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestDNSUpdate(t *testing.T) {
version, err := getVersionDNS("release.forgejo.org")
assert.NoError(t, err)
assert.NotEmpty(t, version)
}