Skip to content

Commit 292016a

Browse files
committed
fixup: Respond to review feedback
1 parent 9c4e037 commit 292016a

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

tests/antithesis/avalanchego/gencomposeconfig/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package main
55

66
import (
7+
"os"
8+
79
"go.uber.org/zap"
810

911
"github.com/ava-labs/avalanchego/tests"
@@ -20,5 +22,6 @@ func main() {
2022
tests.NewDefaultLogger("").Fatal("failed to generate compose config",
2123
zap.Error(err),
2224
)
25+
os.Exit(1)
2326
}
2427
}

tests/antithesis/xsvm/gencomposeconfig/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package main
55

66
import (
7+
"os"
8+
79
"go.uber.org/zap"
810

911
"github.com/ava-labs/avalanchego/genesis"
@@ -25,5 +27,6 @@ func main() {
2527
tests.NewDefaultLogger("").Fatal("failed to generate compose config",
2628
zap.Error(err),
2729
)
30+
os.Exit(1)
2831
}
2932
}

tests/e2e/etna/suites.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,10 @@ var _ = ginkgo.Describe("[Etna]", func() {
2929
require.NoError(err)
3030

3131
now := time.Now()
32-
msg := "etna is activated"
33-
if !upgrades.IsEtnaActivated(now) {
34-
msg = "etna is not activated"
35-
}
36-
tc.Log().Info(msg,
32+
tc.Log().Info("detected if Etna is activated",
3733
zap.Time("now", now),
3834
zap.Time("etnaTime", upgrades.EtnaTime),
35+
zap.Bool("isEtnaActivated", upgrades.IsEtnaActivated(now)),
3936
)
4037
})
4138
})

tests/fixture/tmpnet/cmd/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717

1818
"github.com/ava-labs/avalanchego/tests"
1919
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
20+
"github.com/ava-labs/avalanchego/utils/logging"
2021
"github.com/ava-labs/avalanchego/version"
2122
)
2223

@@ -37,7 +38,7 @@ func main() {
3738
Short: "tmpnetctl commands",
3839
}
3940
rootCmd.PersistentFlags().StringVar(&networkDir, "network-dir", os.Getenv(tmpnet.NetworkDirEnvName), "The path to the configuration directory of a temporary network")
40-
rootCmd.PersistentFlags().StringVar(&rawLogFormat, "log-format", "auto", "The structure of log format. Defaults to 'auto' which formats terminal-like logs, when the output is a terminal. Otherwise, should be one of {auto, plain, colors, json}")
41+
rootCmd.PersistentFlags().StringVar(&rawLogFormat, "log-format", logging.AutoString, logging.FormatDescription)
4142

4243
versionCmd := &cobra.Command{
4344
Use: "version",

tests/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewSimpleLogger(writeCloser io.WriteCloser) logging.Logger {
3737
}
3838

3939
func NewDefaultLogger(prefix string) logging.Logger {
40-
log, err := LoggerForFormat(prefix, "auto")
40+
log, err := LoggerForFormat(prefix, logging.AutoString)
4141
if err != nil {
4242
// This should never happen since auto is a valid log format
4343
panic(err)

0 commit comments

Comments
 (0)