fixing tests, or trisdekaphobia, you be the judge
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -22,4 +22,4 @@ jobs:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Test
|
||||
run: go test -v -ldflags "-X indra.CI=true" -gcflags "all=-trimpath=$GOPATH" ./pkg/...
|
||||
run: go test -v -ldflags "-X indra.CI=true" ./pkg/...
|
||||
|
||||
@@ -77,7 +77,7 @@ func (ng *Engine) HandleMessage(s *splice.Splice, pr ont.Onion) {
|
||||
return
|
||||
}
|
||||
if pr != nil && on.Magic() != pr.Magic() {
|
||||
log.D.S(s.GetAll().ToBytes())
|
||||
log.D.S("",s.GetAll().ToBytes())
|
||||
}
|
||||
m := on.GetOnion()
|
||||
if m == nil {
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestCommand_ParseCLIArgs(t *testing.T) {
|
||||
ec := GetExampleCommands()
|
||||
o, _ := Init(ec, nil)
|
||||
args6 := "/random/path/to/server_binary --cafile ~/some/cafile --LC=cn " +
|
||||
"--lcl node -addrindex false --blocksonly"
|
||||
"node -addrindex false --blocksonly"
|
||||
args6s := strings.Split(args6, " ")
|
||||
run, _, e := o.ParseCLIArgs(args6s)
|
||||
if log.E.Chk(e) {
|
||||
@@ -40,15 +40,7 @@ func TestCommand_ParseCLIArgs(t *testing.T) {
|
||||
t.Error(e)
|
||||
t.FailNow()
|
||||
}
|
||||
args4 := "/random/path/to/server_binary --lcl"
|
||||
args4s := strings.Split(args4, " ")
|
||||
run, _, e = o.ParseCLIArgs(args4s)
|
||||
if log.E.Chk(e) {
|
||||
t.Error(e)
|
||||
t.FailNow()
|
||||
}
|
||||
args5 := "/random/path/to/server_binary --cafile ~/some/cafile --LC=cn " +
|
||||
"--lcl"
|
||||
args5 := "/random/path/to/server_binary --cafile ~/some/cafile --LC=cn "
|
||||
args5s := strings.Split(args5, " ")
|
||||
run, _, e = o.ParseCLIArgs(args5s)
|
||||
if log.E.Chk(e) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
@@ -79,27 +79,13 @@ loaded from at application startup, and where it will be written if changed.
|
||||
`),
|
||||
Default: defaultConfigFile,
|
||||
}, text.NormalizeFilesystemPath(abs, appName)),
|
||||
|
||||
|
||||
"DataDir": text.New(meta.Data{
|
||||
Aliases: []string{"DD"},
|
||||
Label: "Data Directory",
|
||||
Description: "root folder where application data is stored",
|
||||
Default: defaultDataDir,
|
||||
}, text.NormalizeFilesystemPath(abs, appName)),
|
||||
|
||||
"LogCodeLocations": toggle.New(meta.Data{
|
||||
Aliases: []string{"LCL"},
|
||||
Label: "Log Code Locations",
|
||||
Description: "whether to print code locations in logs",
|
||||
Documentation: strings.TrimSpace(strings.TrimSpace(`
|
||||
Toggles on and off the printing of code locations in logs.
|
||||
`)),
|
||||
Default: "false",
|
||||
}, func(o *toggle.Opt) (err error) {
|
||||
log2.CodeLocations(o.Value().Bool())
|
||||
return
|
||||
}),
|
||||
|
||||
"LogLevel": text.New(meta.Data{
|
||||
Aliases: []string{"LL"},
|
||||
Label: "Log Level",
|
||||
@@ -134,7 +120,7 @@ trace log statements will not print.
|
||||
log2.SetLogLevel(lvl)
|
||||
return
|
||||
}),
|
||||
|
||||
|
||||
"LogFilePath": text.New(meta.Data{
|
||||
Aliases: Tags("LFP"),
|
||||
Label: "Log ToHeaderPub File",
|
||||
@@ -147,7 +133,7 @@ Sets the path of the file to write logs to.
|
||||
err = log2.SetLogFilePath(o.Expanded())
|
||||
return
|
||||
}, text.NormalizeFilesystemPath(abs, appName)),
|
||||
|
||||
|
||||
"LogToFile": toggle.New(meta.Data{
|
||||
Aliases: Tags("LTF"),
|
||||
Label: "Log ToHeaderPub File",
|
||||
|
||||
@@ -21,17 +21,17 @@ const (
|
||||
// GitRef is the gitref, as in refs/heads/branchname.
|
||||
GitRef = "refs/heads/master"
|
||||
// ParentGitCommit is the commit hash of the parent HEAD.
|
||||
ParentGitCommit = "050e32309721c4423d6e84ea13e0359fc85ecfeb"
|
||||
ParentGitCommit = "556b0661a703c00cf149a6d32c5374cbc6153a76"
|
||||
// BuildTime stores the time when the current binary was built.
|
||||
BuildTime = "2023-06-07T19:42:31+01:00"
|
||||
BuildTime = "2023-06-07T20:01:04+01:00"
|
||||
// SemVer lists the (latest) git tag on the release.
|
||||
SemVer = "v0.1.13"
|
||||
SemVer = "v0.1.14"
|
||||
// Major is the major number from the tag.
|
||||
Major = 0
|
||||
// Minor is the minor number from the tag.
|
||||
Minor = 1
|
||||
// Patch is the patch version number from the tag.
|
||||
Patch = 13
|
||||
Patch = 14
|
||||
)
|
||||
|
||||
var CI = "false"
|
||||
|
||||
Reference in New Issue
Block a user