forked from smartcontractkit/chainlink
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main_test.go
43 lines (39 loc) · 1.04 KB
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"io/ioutil"
"os"
"github.com/smartcontractkit/chainlink/cmd"
"github.com/smartcontractkit/chainlink/internal/cltest"
)
func ExampleRun_Help() {
tc, cleanup := cltest.NewConfig()
defer cleanup()
testClient := &cmd.Client{
cmd.RendererTable{ioutil.Discard},
tc.Config,
cmd.ChainlinkAppFactory{},
cmd.TerminalAuthenticator{Prompter: &cltest.MockCountingPrompt{}, Exiter: os.Exit},
cmd.ChainlinkRunner{},
}
Run(testClient, "chainlink.test --help")
// Output:
// NAME:
// chainlink.test - CLI for Chainlink
//
// USAGE:
// chainlink.test [global options] command [command options] [arguments...]
//
// VERSION:
// 0.2.0
//
// COMMANDS:
// node, n Run the chainlink node
// jobspecs, j, specs Get all jobs
// show, s Show a specific job
// help, h Shows a list of commands or help for one command
//
// GLOBAL OPTIONS:
// --json, -j json output as opposed to table
// --help, -h show help
// --version, -v print the version
}