Skip to content

Commit

Permalink
chore: Apply statuscheck
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiD2ta committed Sep 25, 2024
1 parent 92b9612 commit 807e5b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
10 changes: 5 additions & 5 deletions cli/eigen-minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,24 @@ func run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("failed to create contract: %v", err)
}

slog.Info(fmt.Sprintf("Checking if can press"))
slog.Info("Checking if can press")
canPress, err := c.CanPress(nil)
if err != nil {
return fmt.Errorf("failed to check if can press: %v", err)
}

if canPress {
slog.Info(fmt.Sprintf("Pressing button"))
slog.Info("Pressing button")
if err := pressButton(cfg, chainIDs[cfg.Network], rpcClient, c); err != nil {
return fmt.Errorf("failed to press button: %v", err)
} else {
slog.Info(fmt.Sprintf("Button pressed successfully"))
slog.Info("Button pressed successfully")
if m != nil {
m.RecordPressButtonSuccess()
}
}
} else {
slog.Info(fmt.Sprintf("Cannot press button at this time"))
slog.Info("Cannot press button at this time")
if m != nil {
m.RecordPressButtonFailure()
}
Expand Down Expand Up @@ -184,7 +184,7 @@ func validateConfig() (Config, error) {
slog.Error(fmt.Sprintf("invalid private key: %v", err))
// Try now to get the private key from the private-key setting
} else {
slog.Debug(fmt.Sprintf("private key is valid"))
slog.Debug("private key is valid")
cfg.PrivateKey = string(pvKeyBytes)
}
}
Expand Down
3 changes: 0 additions & 3 deletions e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ limitations under the License.
package e2e

import (
"context"
"os"
"os/exec"
"path/filepath"
Expand All @@ -39,9 +38,7 @@ type e2eTestCase struct {
act e2eAct
assert e2eAssert
pid int
ctx context.Context
envVars []string
pushgatewayContainer string
}

func newe2eTestCase(t *testing.T, arranger e2eArranger, act e2eAct, assert e2eAssert) *e2eTestCase {
Expand Down
22 changes: 0 additions & 22 deletions e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import (
"github.com/cenkalti/backoff/v4"
)

func runCommand(t *testing.T, path string, binaryName string, args ...string) error {
_, _, err := runCommandOutput(t, path, binaryName, args...)
return err
}

func runCommandCMD(t *testing.T, path string, binaryName string, args ...string) *exec.Cmd {
t.Helper()
Expand All @@ -30,24 +26,6 @@ func runCommandCMD(t *testing.T, path string, binaryName string, args ...string)
return cmd
}

func runCommandOutput(t *testing.T, path string, binaryName string, args ...string) ([]byte, *exec.Cmd, error) {
t.Helper()
t.Logf("Binary path: %s", path)
t.Logf("Running command: %s %s", binaryName, strings.Join(args, " "))
cmd := exec.Command(path, args...)
out, err := cmd.CombinedOutput()
t.Logf("===== OUTPUT =====\n%s\n==================", out)
return out, cmd, err
}

func logAndPipeError(t *testing.T, prefix string, err error) error {
t.Helper()
if err != nil {
t.Log(prefix, err)
}
return err
}

func checkGoInstalled(t *testing.T) {
t.Helper()
err := exec.Command("go", "version").Run()
Expand Down

0 comments on commit 807e5b0

Please sign in to comment.