cloudflare/cloudflared

Public

mirrored fromhttps://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2020.6.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

dbconnect/cmd_test.go

27lines · modecode

1package dbconnect
2
3import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7
8 "gopkg.in/urfave/cli.v2"
9)
10
11func TestCmd(t *testing.T) {
12 tests := [][]string{
13 {"cloudflared", "db-connect", "--playground"},
14 {"cloudflared", "db-connect", "--playground", "--hostname", "sql.mysite.com"},
15 {"cloudflared", "db-connect", "--url", "sqlite3::memory:?cache=shared", "--insecure"},
16 {"cloudflared", "db-connect", "--url", "sqlite3::memory:?cache=shared", "--hostname", "sql.mysite.com", "--auth-domain", "mysite.cloudflareaccess.com", "--application-aud", "aud"},
17 }
18
19 app := &cli.App{
20 Name: "cloudflared",
21 Commands: []*cli.Command{Cmd()},
22 }
23
24 for _, test := range tests {
25 assert.NoError(t, app.Run(test))
26 }
27}
28