Browse Source

agent: commenting some tests

pull/4275/head
Mitchell Hashimoto 7 years ago
parent
commit
22a0eb6c67
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
  1. 8
      agent/agent_endpoint_test.go
  2. 6
      agent/catalog_endpoint_test.go

8
agent/agent_endpoint_test.go

@ -69,6 +69,8 @@ func TestAgent_Services(t *testing.T) {
}
}
// This tests that the agent services endpoint (/v1/agent/services) returns
// Connect proxies.
func TestAgent_Services_ConnectProxy(t *testing.T) {
t.Parallel()
@ -1365,6 +1367,9 @@ func TestAgent_RegisterService_InvalidAddress(t *testing.T) {
}
}
// This tests local agent service registration of a connect proxy. This
// verifies that it is put in the local state store properly for syncing
// later.
func TestAgent_RegisterService_ConnectProxy(t *testing.T) {
t.Parallel()
@ -1401,6 +1406,9 @@ func TestAgent_RegisterService_ConnectProxy(t *testing.T) {
assert.Equal("abc123", a.State.ServiceToken("connect-proxy"))
}
// This tests that connect proxy validation is done for local agent
// registration. This doesn't need to test validation exhaustively since
// that is done via a table test in the structs package.
func TestAgent_RegisterService_ConnectProxyInvalid(t *testing.T) {
t.Parallel()

6
agent/catalog_endpoint_test.go

@ -751,6 +751,8 @@ func TestCatalogServiceNodes_DistanceSort(t *testing.T) {
}
}
// Test that connect proxies can be queried via /v1/catalog/service/:service
// directly and that their results contain the proxy fields.
func TestCatalogServiceNodes_ConnectProxy(t *testing.T) {
t.Parallel()
@ -775,6 +777,8 @@ func TestCatalogServiceNodes_ConnectProxy(t *testing.T) {
assert.Equal(structs.ServiceKindConnectProxy, nodes[0].ServiceKind)
}
// Test that the Connect-compatible endpoints can be queried for a
// service via /v1/catalog/connect/:service.
func TestCatalogConnectServiceNodes_good(t *testing.T) {
t.Parallel()
@ -834,6 +838,8 @@ func TestCatalogNodeServices(t *testing.T) {
}
}
// Test that the services on a node contain all the Connect proxies on
// the node as well with their fields properly populated.
func TestCatalogNodeServices_ConnectProxy(t *testing.T) {
t.Parallel()

Loading…
Cancel
Save