public async Task Can_Create_DiagnosticsReport() { var report = await _cluster.DiagnosticsAsync(); Assert.NotNull(report); Assert.NotEmpty(report.Id); Assert.Equal(ClientIdentifier.GetClientDescription(), report.Sdk); Assert.Equal(1, report.Version); Assert.Contains(report.Services["kv"], e => e.Type == ServiceType.KeyValue); // at least one KV Assert.Contains(report.Services["view"], e => e.Type == ServiceType.Views); // at least one Index Assert.Contains(report.Services["n1ql"], e => e.Type == ServiceType.Query); // at least one N1QL Assert.Contains(report.Services["fts"], e => e.Type == ServiceType.Search); Assert.Contains(report.Services["cbas"], e => e.Type == ServiceType.Analytics); }
public static Task <IDiagnosticsReport> DiagnosticsAsync(this ICluster cluster, Action <DiagnosticsOptions> configureOptions) { var options = new DiagnosticsOptions(); configureOptions?.Invoke(options); return(cluster.DiagnosticsAsync(options)); }