Skip to content

Commit

Permalink
fixup: Respond to review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Nov 21, 2024
1 parent 9c4e037 commit 292016a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions tests/antithesis/avalanchego/gencomposeconfig/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package main

import (
"os"

"go.uber.org/zap"

"github.com/ava-labs/avalanchego/tests"
Expand All @@ -20,5 +22,6 @@ func main() {
tests.NewDefaultLogger("").Fatal("failed to generate compose config",
zap.Error(err),
)
os.Exit(1)
}
}
3 changes: 3 additions & 0 deletions tests/antithesis/xsvm/gencomposeconfig/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package main

import (
"os"

"go.uber.org/zap"

"github.com/ava-labs/avalanchego/genesis"
Expand All @@ -25,5 +27,6 @@ func main() {
tests.NewDefaultLogger("").Fatal("failed to generate compose config",
zap.Error(err),
)
os.Exit(1)
}
}
7 changes: 2 additions & 5 deletions tests/e2e/etna/suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ var _ = ginkgo.Describe("[Etna]", func() {
require.NoError(err)

now := time.Now()
msg := "etna is activated"
if !upgrades.IsEtnaActivated(now) {
msg = "etna is not activated"
}
tc.Log().Info(msg,
tc.Log().Info("detected if Etna is activated",
zap.Time("now", now),
zap.Time("etnaTime", upgrades.EtnaTime),
zap.Bool("isEtnaActivated", upgrades.IsEtnaActivated(now)),
)
})
})
3 changes: 2 additions & 1 deletion tests/fixture/tmpnet/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/ava-labs/avalanchego/tests"
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
"github.com/ava-labs/avalanchego/utils/logging"
"github.com/ava-labs/avalanchego/version"
)

Expand All @@ -37,7 +38,7 @@ func main() {
Short: "tmpnetctl commands",
}
rootCmd.PersistentFlags().StringVar(&networkDir, "network-dir", os.Getenv(tmpnet.NetworkDirEnvName), "The path to the configuration directory of a temporary network")
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}")
rootCmd.PersistentFlags().StringVar(&rawLogFormat, "log-format", logging.AutoString, logging.FormatDescription)

versionCmd := &cobra.Command{
Use: "version",
Expand Down
2 changes: 1 addition & 1 deletion tests/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewSimpleLogger(writeCloser io.WriteCloser) logging.Logger {
}

func NewDefaultLogger(prefix string) logging.Logger {
log, err := LoggerForFormat(prefix, "auto")
log, err := LoggerForFormat(prefix, logging.AutoString)
if err != nil {
// This should never happen since auto is a valid log format
panic(err)
Expand Down

0 comments on commit 292016a

Please sign in to comment.