MCPcopy
hub / github.com/etcd-io/etcd / TestAuthority

Function TestAuthority

tests/integration/grpc_test.go:32–116  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func TestAuthority(t *testing.T) {
33 tcs := []struct {
34 name string
35 useTCP bool
36 useTLS bool
37 clientURLPattern string
38 expectAuthorityPattern string
39 }{
40 {
41 name: "unix:path",
42 clientURLPattern: "unix:localhost:${MEMBER_NAME}",
43 expectAuthorityPattern: "localhost:${MEMBER_NAME}",
44 },
45 {
46 name: "unix://absolute_path",
47 clientURLPattern: "unix://localhost:${MEMBER_NAME}",
48 expectAuthorityPattern: "localhost:${MEMBER_NAME}",
49 },
50 // "unixs" is not standard schema supported by etcd
51 {
52 name: "unixs:absolute_path",
53 useTLS: true,
54 clientURLPattern: "unixs:localhost:${MEMBER_NAME}",
55 expectAuthorityPattern: "localhost:${MEMBER_NAME}",
56 },
57 {
58 name: "unixs://absolute_path",
59 useTLS: true,
60 clientURLPattern: "unixs://localhost:${MEMBER_NAME}",
61 expectAuthorityPattern: "localhost:${MEMBER_NAME}",
62 },
63 {
64 name: "http://domain[:port]",
65 useTCP: true,
66 clientURLPattern: "http://localhost:${MEMBER_PORT}",
67 expectAuthorityPattern: "localhost:${MEMBER_PORT}",
68 },
69 {
70 name: "https://domain[:port]",
71 useTLS: true,
72 useTCP: true,
73 clientURLPattern: "https://localhost:${MEMBER_PORT}",
74 expectAuthorityPattern: "localhost:${MEMBER_PORT}",
75 },
76 {
77 name: "http://address[:port]",
78 useTCP: true,
79 clientURLPattern: "http://127.0.0.1:${MEMBER_PORT}",
80 expectAuthorityPattern: "127.0.0.1:${MEMBER_PORT}",
81 },
82 {
83 name: "https://address[:port]",
84 useTCP: true,
85 useTLS: true,
86 clientURLPattern: "https://127.0.0.1:${MEMBER_PORT}",
87 expectAuthorityPattern: "127.0.0.1:${MEMBER_PORT}",
88 },
89 }

Callers

nothing calls this directly

Calls 9

TerminateMethod · 0.95
setupTLSFunction · 0.85
setupClientFunction · 0.85
assertAuthorityFunction · 0.70
RunMethod · 0.65
BeforeTestMethod · 0.65
NewClusterMethod · 0.65
CloseMethod · 0.65
PutMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…