Browse Source

added root_test.go

pull/56/head
jahway603 11 months ago
parent
commit
69fdfe580b
  1. 22
      cmd/root_test.go
  2. 7
      common/logging/logging_test.go

22
cmd/root_test.go

@ -0,0 +1,22 @@
// Copyright (c) 2019-2023 Duke Leto and The Hush developers
// Copyright (c) 2019-2020 The Zcash developers
// Distributed under the GPLv3 software license
package cmd
import (
"testing"
)
func TestFileExists(t *testing.T) {
if fileExists("nonexistent-file") {
t.Fatal("fileExists unexpected success")
}
// If the path exists but is a directory, should return false
if fileExists(".") {
t.Fatal("fileExists unexpected success")
}
// The following file should exist, it's what's being tested
if !fileExists("root.go") {
t.Fatal("fileExists failed")
}
}

7
common/logging/logging_test.go

@ -1,6 +1,6 @@
// Copyright (c) 2019-2023 Duke Leto and The Hush developers
// Copyright (c) 2019-2020 The Zcash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
// Distributed under the GPLv3 software license
package logging
import (
@ -10,8 +10,9 @@ import (
"testing"
"errors"
"github.com/sirupsen/logrus"
"git.hush.is/hush/lightwalletd/common"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/peer"
)

Loading…
Cancel
Save