fix: actually fix predastore integration test

This commit is contained in:
Julian Sommer
2026-05-21 15:13:14 +10:00
parent f374ab41c5
commit 6d650f6c3a
3 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ require (
github.com/insomniacslk/dhcp v0.0.0-20260407060928-11b94ed970f2
github.com/kdomanski/iso9660 v0.4.0
github.com/klauspost/cpuid/v2 v2.3.0
github.com/mulgadc/predastore v1.4.1
github.com/mulgadc/predastore v1.4.2
github.com/mulgadc/viperblock v1.4.2
github.com/nats-io/nats-server/v2 v2.14.0
github.com/nats-io/nats.go v1.52.0
+2
View File
@@ -288,6 +288,8 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/mulgadc/predastore v1.4.1 h1:Eyf31mLeJHz0a13NvoEa1s5/Pnxh7s0Hcn/Xdmm2zMs=
github.com/mulgadc/predastore v1.4.1/go.mod h1:fXIGz7yCKcHh68ybcw7aigdOdzIfyt19h/0diPF+JCU=
github.com/mulgadc/predastore v1.4.2 h1:fHboSJRGdGSiuNQquRH8ve7vmn43cD3iRtKPhHMqXdE=
github.com/mulgadc/predastore v1.4.2/go.mod h1:fXIGz7yCKcHh68ybcw7aigdOdzIfyt19h/0diPF+JCU=
github.com/mulgadc/viperblock v1.4.2 h1:05mp5kCIar70pxkYx/xFA0lGK9PfR87WGNxUSn34Dbg=
github.com/mulgadc/viperblock v1.4.2/go.mod h1:hHdfo02iJgCdNktiPAq+x+VQE0ZNYOLJXw0abJ81LeE=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -168,6 +168,16 @@ func startPredastoreServer(t *testing.T) *Config {
// once-per-process singleton.
quicclient.SetDefaultRootCAs(caPool)
// Predastore's in-process s3db REST client (port 6660) has no public
// hook to override its RootCAs — it uses the OS trust store via the
// default tls.Config (RootCAs nil ⇒ x509.SystemCertPool, which Go reads
// from SSL_CERT_FILE on Unix). Point it at the ephemeral cert so the
// in-process bucket/object metadata calls trust their own server.
// x509.SystemCertPool is sync.Once-cached, so the pool is loaded on
// the first dial below while SSL_CERT_FILE is still set, and stays
// valid for the rest of the process even after t.Setenv reverts.
t.Setenv("SSL_CERT_FILE", certPath)
// Predastore mandates a 32-byte master key at mode 0600 (rejected otherwise
// by internal/keyfile.Load).
encryptionKeyPath := filepath.Join(testDir, "encryption.key")