From 733d76a88d7a28434ab46bfe4f8e45821e7568b5 Mon Sep 17 00:00:00 2001 From: Delweng Date: Thu, 4 Aug 2022 15:42:03 +0800 Subject: [PATCH] node: remove noop path.Join (#25475) Signed-off-by: Delweng --- node/config_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/config_test.go b/node/config_test.go index 62b2fbbd1..e8af8ddcd 100644 --- a/node/config_test.go +++ b/node/config_test.go @@ -115,7 +115,7 @@ func TestNodeKeyPersistency(t *testing.T) { } config := &Config{Name: "unit-test", DataDir: dir, P2P: p2p.Config{PrivateKey: key}} config.NodeKey() - if _, err := os.Stat(filepath.Join(keyfile)); err == nil { + if _, err := os.Stat(keyfile); err == nil { t.Fatalf("one-shot node key persisted to data directory") } @@ -136,7 +136,7 @@ func TestNodeKeyPersistency(t *testing.T) { // Configure a new node and ensure the previously persisted key is loaded config = &Config{Name: "unit-test", DataDir: dir} config.NodeKey() - blob2, err := os.ReadFile(filepath.Join(keyfile)) + blob2, err := os.ReadFile(keyfile) if err != nil { t.Fatalf("failed to read previously persisted node key: %v", err) }