Skip to content

Commit

Permalink
docs(test): properly document test cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
xizhao committed Feb 17, 2018
1 parent 37f8a21 commit 2fef009
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/fossa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -93,7 +92,7 @@ func main() {
cli.StringFlag{Name: "p, project", Usage: projectUsage},
cli.StringFlag{Name: "r, revision", Usage: revisionUsage},
cli.StringFlag{Name: "e, endpoint", Usage: endpointUsage},
cli.IntFlag{Name: "t, timeout", Usage: "timeout for waiting for build status; defaults to 30m", Value: 1000 * 60 * 30},
cli.IntFlag{Name: "t, timeout", Usage: "timeout for waiting for build status in seconds; defaults to 10m", Value: 60 * 10},
cli.BoolFlag{Name: "debug", Usage: debugUsage},
},
},
Expand Down Expand Up @@ -340,7 +339,7 @@ func resolveModuleConfig(moduleConfig moduleConfig) (module.Builder, module.Modu
}
default:
mainLogger.Debug("Got unknown module.")
return builder, m, errors.New("unknown module type: " + string(moduleConfig.Type))
return builder, m, fmt.Errorf("unknown module type: %s", moduleConfig.Type)
}

mainLogger.Debugf("Resolved moduleConfig to: %#v, %#v", builder, m)
Expand Down
3 changes: 3 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ Print the version, then exit.
#### `-h, --help`
Print a help message, then exit.

#### `-t, --timeout`
Passed to `fossa test` to specify a test timeout (seconds).

<!-- ## `fossa init`

Makes a best-effort attempt at inferring the correct configuration, then outputs the configuration to `stdout`.
Expand Down

0 comments on commit 2fef009

Please sign in to comment.