agent: commenting some tests

This commit is contained in:
Mitchell Hashimoto 2018-03-12 13:05:06 -07:00
parent 6313bc5615
commit 22a0eb6c67
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 14 additions and 0 deletions

View File

@ -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()

View File

@ -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()