Move ssh-client's tests and dependencies onto the SDK's forgekey (issue 1480), part 3 of 17

This commit is contained in:
2026-10-20 20:45:35 +00:00
parent bf8f47ce66
commit 8dc0bc98bd
7 changed files with 159 additions and 37 deletions
@@ -15,6 +15,7 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-sdk/go/forgekey"
"github.com/nats-io/nats-server/v2/server"
"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"
@@ -170,7 +171,7 @@ func TestTheKeyProcessMakesTheKeyAndPutsItsEntryOverTheBus(t *testing.T) {
if raw == nil {
t.Fatalf("no entry %s in the keys state within 60 s", key)
}
var e KeyEntry
var e forgekey.KeyEntry
if err := json.Unmarshal(raw, &e); err != nil {
t.Fatal(err)
}
@@ -180,7 +181,7 @@ func TestTheKeyProcessMakesTheKeyAndPutsItsEntryOverTheBus(t *testing.T) {
if strings.Contains(strings.ToUpper(string(raw)), "PRIVATE") {
t.Errorf("the entry carries private material: %s", raw)
}
info, err := os.Stat(filepath.Join(home, ".ssh", KeyFile))
info, err := os.Stat(filepath.Join(home, ".ssh", forgekey.KeyFile))
if err != nil {
t.Fatal(err)
}