Exemplo n.º 1
0
        public ModelTrackingIssue AddTrackingIssue(
            TrackingKind trackingKind,
            string?title = null,
            SearchTestsRequest?testsRequest         = null,
            SearchTimelinesRequest?timelinesRequest = null,
            SearchBuildLogsRequest?buildLogsRequest = null,
            SearchHelixLogsRequest?helixLogsRequest = null,
            ModelBuildDefinition?definition         = null)
        {
            var query = testsRequest?.GetQueryString();

            query ??= timelinesRequest?.GetQueryString();
            query ??= buildLogsRequest?.GetQueryString();
            query ??= helixLogsRequest?.GetQueryString();

            var trackingIssue = new ModelTrackingIssue()
            {
                TrackingKind         = trackingKind,
                SearchQuery          = query,
                IsActive             = true,
                ModelBuildDefinition = definition,
                IssueTitle           = title ?? $"Tracking Issue {trackingKind}",
            };

            Context.ModelTrackingIssues.Add(trackingIssue);
            return(trackingIssue);
        }
Exemplo n.º 2
0
        public void HelixLogsRoundTrip(string toParse, string userQuery)
        {
            var options = new SearchHelixLogsRequest();

            options.ParseQueryString(toParse);
            Assert.Equal(userQuery, options.GetQueryString());
        }