attempting to run CI unittests for .netcore and .netframework projects (#5886)

* attempting to run CI unittests as seperate passes for .netframework and .netcore, based on assemblies.

* Mocking CSearchManager to avoid the following exception running in CI.

Retrieving the COM class factory for component with CLSID {7D096C5F-AC08-4F1F-BEB7-5C22C517CE39} failed due to the following error: 80070422 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (0x80070422).

* Setting proper connection string for unit test.

* Mocking sqlQuery with FilePath vs m*

* Temporarily Ignoring test that is throwing exception in CI.
This commit is contained in:
ryanbodrug-microsoft
2020-08-18 13:19:35 -07:00
committed by GitHub
parent cedc4f710e
commit 8c98c7df29
4 changed files with 66 additions and 28 deletions

View File

@@ -14,6 +14,7 @@ using System.Windows.Controls;
using Microsoft.Plugin.Indexer.DriveDetection;
using Microsoft.Plugin.Indexer.SearchHelper;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.Search.Interop;
using Wox.Infrastructure.Logger;
using Wox.Infrastructure.Storage;
using Wox.Plugin;
@@ -95,7 +96,9 @@ namespace Microsoft.Plugin.Indexer
});
}
var searchResultsList = _api.Search(searchQuery, isFullQuery, maxCount: _settings.MaxSearchCount).ToList();
// This uses the Microsoft.Search.Interop assembly
var searchManager = new CSearchManager();
var searchResultsList = _api.Search(searchQuery, searchManager, isFullQuery, maxCount: _settings.MaxSearchCount).ToList();
// If the delayed execution query is not required (since the SQL query is fast) return empty results
if (searchResultsList.Count == 0 && isFullQuery)