Document and add support to input plugins for logging alias (#6357)

This commit is contained in:
Greg
2019-09-23 16:39:50 -06:00
committed by Daniel Nelson
parent e42d2e39c6
commit 817c9a69a9
111 changed files with 961 additions and 659 deletions

View File

@@ -104,8 +104,10 @@ func TestGNMIError(t *testing.T) {
acc := &testutil.Accumulator{}
gnmi.RegisterGNMIServer(server, &mockGNMIServer{t: t, scenario: 0, server: server, acc: acc})
c := &CiscoTelemetryGNMI{Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
c := &CiscoTelemetryGNMI{
Log: testutil.Logger{},
Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
Redial: internal.Duration{Duration: 1 * time.Second}}
require.NoError(t, c.Start(acc))
@@ -174,8 +176,10 @@ func TestGNMIMultiple(t *testing.T) {
acc := &testutil.Accumulator{}
gnmi.RegisterGNMIServer(server, &mockGNMIServer{t: t, scenario: 1, server: server, acc: acc})
c := &CiscoTelemetryGNMI{Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
c := &CiscoTelemetryGNMI{
Log: testutil.Logger{},
Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
Redial: internal.Duration{Duration: 1 * time.Second},
Subscriptions: []Subscription{{Name: "alias", Origin: "type", Path: "/model", SubscriptionMode: "sample"}},
}
@@ -215,8 +219,10 @@ func TestGNMIMultipleRedial(t *testing.T) {
acc := &testutil.Accumulator{}
gnmi.RegisterGNMIServer(server, &mockGNMIServer{t: t, scenario: 2, server: server, acc: acc})
c := &CiscoTelemetryGNMI{Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
c := &CiscoTelemetryGNMI{
Log: testutil.Logger{},
Addresses: []string{listener.Addr().String()},
Username: "theuser", Password: "thepassword", Encoding: "proto",
Redial: internal.Duration{Duration: 10 * time.Millisecond},
Subscriptions: []Subscription{{Name: "alias", Origin: "type", Path: "/model", SubscriptionMode: "sample"}},
}