17717: more changes post review: remove unneeded debug print, switch
authorWard Vandewege <ward@curii.com>
Tue, 8 Jun 2021 14:47:31 +0000 (10:47 -0400)
committerWard Vandewege <ward@curii.com>
Tue, 8 Jun 2021 14:47:31 +0000 (10:47 -0400)
       Command to value receiver.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

lib/costanalyzer/cmd.go
lib/costanalyzer/costanalyzer.go
lib/costanalyzer/costanalyzer_test.go

index c44f328620bdf3f6c9ba9afbde46cf1e9de35cc1..525ec619b5e4aeeb0b4e271704f13385a41bcefd 100644 (file)
@@ -12,7 +12,7 @@ import (
        "github.com/sirupsen/logrus"
 )
 
-var Command = &command{}
+var Command = command{}
 
 type command struct {
        uuids      arrayFlags
@@ -29,7 +29,7 @@ func (f *NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) {
 }
 
 // RunCommand implements the subcommand "costanalyzer <collection> <collection> ..."
-func (c *command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
+func (c command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
        var err error
        logger := ctxlog.New(stderr, "text", "info")
        defer func() {
index 9773109ad47dc5bc21915cf47fec59a63ab50002..edaaa5bd178243f2c9044d32398c5ddccc67b5dc 100644 (file)
@@ -161,7 +161,6 @@ Options:
                exitCode = 2
                return
        }
-       fmt.Printf("UUIDS: %s\n", c.uuids)
 
        lvl, err := logrus.ParseLevel(*loglevel)
        if err != nil {
index a3c123b5165f42939b4afc21fd2dcb17fda280d9..bf280ec0c5569d667619b2c968b42a7343ef967e 100644 (file)
@@ -114,10 +114,6 @@ func (s *Suite) SetUpSuite(c *check.C) {
        createNodeJSON(c, arv, ac, kc, arvadostest.CompletedDiagnosticsHasher3ContainerRequestUUID, arvadostest.Hasher3LogCollectionUUID, legacyD1V2JSON)
 }
 
-func (s *Suite) SetUpTest(c *check.C) {
-       Command = &command{}
-}
-
 func createNodeJSON(c *check.C, arv *arvadosclient.ArvadosClient, ac *arvados.Client, kc *keepclient.KeepClient, crUUID string, logUUID string, nodeJSON string) {
        // Get the CR
        var cr arvados.ContainerRequest