@@ -3,7 +3,6 @@ package tests
33import (
44 "encoding/base64"
55 "fmt"
6- "path/filepath"
76 "testing"
87 "time"
98
@@ -286,7 +285,7 @@ func TestCmdRotateKey(t *testing.T) {
286285 t .Parallel ()
287286 env := NewTestEnv (t )
288287 a := env .AddDaemon (func (cfg * daemon.Config ) {
289- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
288+
290289 })
291290
292291 rc , err := registry .Dial (env .RegistryAddr )
@@ -330,7 +329,7 @@ func TestCmdRotateKeyBadSignature(t *testing.T) {
330329 t .Parallel ()
331330 env := NewTestEnv (t )
332331 a := env .AddDaemon (func (cfg * daemon.Config ) {
333- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
332+
334333 })
335334
336335 rc , err := registry .Dial (env .RegistryAddr )
@@ -515,15 +514,15 @@ func TestCmdHandshakePendingApproveReject(t *testing.T) {
515514
516515 a := env .AddDaemon (func (cfg * daemon.Config ) {
517516 cfg .Encrypt = true
518- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
517+
519518 })
520519 b := env .AddDaemon (func (cfg * daemon.Config ) {
521520 cfg .Encrypt = true
522- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
521+
523522 })
524523 c := env .AddDaemon (func (cfg * daemon.Config ) {
525524 cfg .Encrypt = true
526- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
525+
527526 })
528527
529528 // B sends handshake to A
@@ -630,11 +629,11 @@ func TestCmdUntrust(t *testing.T) {
630629
631630 a := env .AddDaemon (func (cfg * daemon.Config ) {
632631 cfg .Encrypt = true
633- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
632+
634633 })
635634 b := env .AddDaemon (func (cfg * daemon.Config ) {
636635 cfg .Encrypt = true
637- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
636+
638637 })
639638
640639 // Mutual handshake: both sides request
@@ -692,10 +691,10 @@ func TestCmdHandshakeRelayUnsigned(t *testing.T) {
692691 env := NewTestEnv (t )
693692
694693 a := env .AddDaemon (func (cfg * daemon.Config ) {
695- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
694+
696695 })
697696 b := env .AddDaemon (func (cfg * daemon.Config ) {
698- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
697+
699698 })
700699
701700 rc , err := registry .Dial (env .RegistryAddr )
@@ -724,10 +723,10 @@ func TestCmdHandshakeRelaySignedOK(t *testing.T) {
724723 env := NewTestEnv (t )
725724
726725 a := env .AddDaemon (func (cfg * daemon.Config ) {
727- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
726+
728727 })
729728 b := env .AddDaemon (func (cfg * daemon.Config ) {
730- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
729+
731730 })
732731
733732 rc , err := registry .Dial (env .RegistryAddr )
@@ -764,10 +763,10 @@ func TestCmdRespondHandshakeUnsigned(t *testing.T) {
764763 env := NewTestEnv (t )
765764
766765 a := env .AddDaemon (func (cfg * daemon.Config ) {
767- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
766+
768767 })
769768 b := env .AddDaemon (func (cfg * daemon.Config ) {
770- cfg . IdentityPath = filepath . Join ( t . TempDir (), "identity.json" )
769+
771770 })
772771
773772 rc , err := registry .Dial (env .RegistryAddr )
@@ -835,10 +834,7 @@ func TestCmdIdentityConsistency(t *testing.T) {
835834 t .Parallel ()
836835 env := NewTestEnv (t )
837836
838- idPath := filepath .Join (t .TempDir (), "identity.json" )
839- a := env .AddDaemon (func (cfg * daemon.Config ) {
840- cfg .IdentityPath = idPath
841- })
837+ a := env .AddDaemon ()
842838
843839 identity := a .Daemon .Identity ()
844840 if identity == nil {
0 commit comments