-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathmain_test.go
53 lines (48 loc) · 1.73 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
44
45
46
47
48
49
50
51
52
53
// +build !windows
package main
import (
"io/ioutil"
"github.com/smartcontractkit/chainlink/cmd"
"github.com/smartcontractkit/chainlink/internal/cltest"
)
func ExampleRun() {
tc, cleanup := cltest.NewConfig()
defer cleanup()
testClient := &cmd.Client{
Renderer: cmd.RendererTable{Writer: ioutil.Discard},
Config: tc.Config,
AppFactory: cmd.ChainlinkAppFactory{},
Auth: cmd.TerminalAuthenticator{Prompter: &cltest.MockCountingPrompt{}},
Runner: 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
// account, a Display the account address with its ETH & LINK balances
// jobspecs, jobs, j, specs Get all jobs
// show, s Show a specific job
// create, c Create job spec from JSON
// run, r Begin job run for specid
// backup Backup the database of the running node
// import, i Import a key file to use with the node
// bridge Add a new bridge to the node
// getbridges List all bridges added to the node
// showbridge Show a specific bridge
// removebridge Removes a specific bridge
// 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
}