go-blockchain/dns_test.go
Claude a328c9f859
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
test: add tests for service, dns, forge, alias, blockdata (6 files)
service_test.go: NewBlockchainService, seedToRPC routing
dns_test.go: DNSRecord struct
forge_test.go: publish_release, dispatch_build, no-version error
chain/alias_test.go: PutGet round-trip, GetAll, NotFound error
chain/blockdata_test.go: WriteAtomic (no temp left), EnsureDir

21 untested files → 15 remaining. Closing gaps systematically.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 03:54:45 +01:00

13 lines
259 B
Go

package blockchain
import "testing"
func TestDNSRecord_Good(t *testing.T) {
r := DNSRecord{Name: "charon.lthn", A: []string{"10.69.69.165"}}
if r.Name != "charon.lthn" {
t.Error("wrong name")
}
if len(r.A) != 1 {
t.Error("expected 1 A record")
}
}