From fb6e2d75d3bdc28d1db3f47198a32f3b50db1679 Mon Sep 17 00:00:00 2001 From: Timo Wolters <85983987+TimoWolters@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:14:45 +0200 Subject: [PATCH] Squashed commit of the following: commit d36a0a6ede6f257b1bc2b518ba82c61888ede219 Author: Timo Wolters <85983987+TimoWolters@users.noreply.github.com> Date: Thu Aug 12 14:14:12 2021 +0200 Update FileConfigurationStorage.cs The default configuration will be returned instead of throwing an exception. This should help make the application more resilient during startup. commit deabce51ae28cabbc1a1ff719b4b84e32b050eda Author: Timo Wolters <85983987+TimoWolters@users.noreply.github.com> Date: Thu Aug 12 13:44:19 2021 +0200 Updating to LibGit2Sharp Prelease The prerelease version should be able to handle missing dlls better than the official release based on https://github.com/libgit2/libgit2sharp/pull/1741 commit 98808bc0dbfb6c61b4ad2cf01d27d21a2fe9e7b9 Author: Timo Wolters <85983987+TimoWolters@users.noreply.github.com> Date: Thu Aug 12 12:59:09 2021 +0200 Fixed issues with failing integration tests. Enabled integration tests in Github Actions again. Bugfix: Integration tests will no longer execute in parallel to avoid accessing shared resources. Bugfix: Fixed an issue with misleading messages during initial setup. --- .github/workflows/dotnet.yml | 2 +- .../FileConfigurationStorage.cs | 3 +- .../CustomWebApplicationFactory.cs | 5 ++- .../xunit.runner.json | 4 ++ .../AbstractNpmInstallProvider.cs | 6 +-- .../Assets/licenses.json | 11 +++++ .../Assets/nuget-cache.json | 43 +++++++++++++++++++ .../LotsenApp.LicenseManager.csproj | 2 +- 8 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 test/LotsenApp.Client.Electron.Test/xunit.runner.json diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 903bbc1..b562285 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,4 +21,4 @@ jobs: - name: Build run: dotnet build --no-restore - name: Test - run: dotnet test --no-build --verbosity normal --filter Type!=Integration \ No newline at end of file + run: dotnet test --no-build --verbosity normal \ No newline at end of file diff --git a/src/LotsenApp.Client.Configuration.File/FileConfigurationStorage.cs b/src/LotsenApp.Client.Configuration.File/FileConfigurationStorage.cs index 0043f25..4fc82b5 100644 --- a/src/LotsenApp.Client.Configuration.File/FileConfigurationStorage.cs +++ b/src/LotsenApp.Client.Configuration.File/FileConfigurationStorage.cs @@ -93,7 +93,8 @@ public Task GetGlobalConfiguration(AccessMode accessMode = } } - throw new Exception("There was an error accessing the global configuration"); + return Task.FromResult(new GlobalConfiguration()); + // throw new Exception("There was an error accessing the global configuration"); } public Task SaveGlobalConfiguration(GlobalConfiguration configuration) diff --git a/test/LotsenApp.Client.Electron.Test/CustomWebApplicationFactory.cs b/test/LotsenApp.Client.Electron.Test/CustomWebApplicationFactory.cs index 205f969..d8f21cb 100644 --- a/test/LotsenApp.Client.Electron.Test/CustomWebApplicationFactory.cs +++ b/test/LotsenApp.Client.Electron.Test/CustomWebApplicationFactory.cs @@ -26,9 +26,11 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Net; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Razor; @@ -67,10 +69,11 @@ public string LotsenAppRepositoryRoot public CustomWebApplicationFactory() { _directory = $"src/LotsenApp.Client.Electron/obj/Debug/{Guid.NewGuid().ToString()}"; - // Directory.CreateDirectory(Path.Join(LotsenAppRepositoryRoot, _directory)); } protected override void ConfigureWebHost(IWebHostBuilder builder) { + var dir = Directory.CreateDirectory(Path.Join(Environment.CurrentDirectory, Guid.NewGuid().ToString())); + Environment.CurrentDirectory = dir.FullName; Startup.Mode = ApplicationMode.Server; // builder.UseStartup(); builder.UseSolutionRelativeContentRoot("src/LotsenApp.Client.Electron"); diff --git a/test/LotsenApp.Client.Electron.Test/xunit.runner.json b/test/LotsenApp.Client.Electron.Test/xunit.runner.json new file mode 100644 index 0000000..015166b --- /dev/null +++ b/test/LotsenApp.Client.Electron.Test/xunit.runner.json @@ -0,0 +1,4 @@ +{ + "parallelizeAssembly": false, + "parallelizeTestCollections": false +} \ No newline at end of file diff --git a/tools/LotsenApp.Development.Setup/AbstractNpmInstallProvider.cs b/tools/LotsenApp.Development.Setup/AbstractNpmInstallProvider.cs index 9d0579b..2c56c69 100644 --- a/tools/LotsenApp.Development.Setup/AbstractNpmInstallProvider.cs +++ b/tools/LotsenApp.Development.Setup/AbstractNpmInstallProvider.cs @@ -21,13 +21,11 @@ public Task PerformSetup() for (var i = interval; i < maxExecutionTime; i+= interval) { var j = i; - // ReSharper disable once MethodSupportsCancellation - Task.Delay(TimeSpan.FromSeconds(j)) - // ReSharper disable once MethodSupportsCancellation + Task.Delay(TimeSpan.FromSeconds(j), cancellationToken.Token) .ContinueWith(_ => { Console.Write($"\rnpm install ran for {j} seconds and will be cancelled in {maxExecutionTime - j} seconds. Press 'c' to cancel the operation immediately."); - }); + }, cancellationToken.Token); } // ReSharper disable once MethodSupportsCancellation diff --git a/tools/LotsenApp.LicenseManager/Assets/licenses.json b/tools/LotsenApp.LicenseManager/Assets/licenses.json index 5cc7950..12f640f 100644 --- a/tools/LotsenApp.LicenseManager/Assets/licenses.json +++ b/tools/LotsenApp.LicenseManager/Assets/licenses.json @@ -654,5 +654,16 @@ "SeeAlso": null, "IsOsiApproved": false, "LicenseTextHtml": null + }, + { + "IsDeprecatedLicenseId": false, + "IsFsfLibre": false, + "LicenseText": "\n\n\n\tbouncycastle.org\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n\n
\n\t
\n\t\t

The Legion of the Bouncy Castle

\n\t
\n
\n\n\n
\n\n\t
\n \n\t\t
\n

Please note: our license is an adaptation of the MIT X11 License and should be read as such.

\n

Please also note: this licensing model is made possible through funding from donations and the sale of support contracts.

\n\t\t\t

License

\n\t\t\t

Copyright (c) 2000 - 2017 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)\n\t\t\t

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\t\t\t

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\t\t\t

THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\t\t

\n\t\t
 
\n\n\t
\n
\n
 
\n\n\n
\n\t\n
\n\n\n\n", + "Name": null, + "LicenseId": "https://www.bouncycastle.org/csharp/licence.html", + "CrossRef": null, + "SeeAlso": null, + "IsOsiApproved": false, + "LicenseTextHtml": null } ] \ No newline at end of file diff --git a/tools/LotsenApp.LicenseManager/Assets/nuget-cache.json b/tools/LotsenApp.LicenseManager/Assets/nuget-cache.json index 2ce524f..87d38ff 100644 --- a/tools/LotsenApp.LicenseManager/Assets/nuget-cache.json +++ b/tools/LotsenApp.LicenseManager/Assets/nuget-cache.json @@ -48780,5 +48780,48 @@ "TargetFramework": ".NETStandard2.0" } ] + }, + "Portable.BouncyCastle@1.8.10": { + "@id": "https://api.nuget.org/v3/catalog0/data/2021.02.19.21.16.19/portable.bouncycastle.1.8.10.json", + "@type": [ + "PackageDetails", + "catalog:Permalink" + ], + "Authors": "Claire Novotny", + "Copyright": "© 2000-2021 Legion of the Bouncy Castle Inc.", + "Created": "2021-02-19T21:14:13.537Z", + "Description": "BouncyCastle portable version with support for .NET 4, .NET Standard 2.0", + "IconFile": null, + "Id": "Portable.BouncyCastle", + "IsPrerelease": false, + "LastEdited": "2021-02-19T21:16:18.95Z", + "LicenseExpression": null, + "LicenseUrl": "https://www.bouncycastle.org/csharp/licence.html", + "Listed": true, + "MinClientVersion": null, + "PackageHash": "b7zjLYytAljmNGKnthuwXbiLKfPMNoi04YHUeWj8BwPMVI6R7dwJRQnnfMfOReSPxjU/KvKNJnO9I1Q5yn4EQA==", + "PackageHashAlgorithm": "SHA512", + "PackageSize": 3153922, + "ProjectUrl": "https://www.bouncycastle.org/csharp/", + "Published": "2021-02-19T21:14:13.537Z", + "Repository": "", + "RequireLicenseAcceptance": false, + "Title": "Bouncy Castle Portable", + "VerbatimVersion": "1.8.10", + "Version": "1.8.10", + "DependencyGroups": [ + { + "@id": "https://api.nuget.org/v3/catalog0/data/2021.02.19.21.16.19/portable.bouncycastle.1.8.10.json#dependencygroup/.netframework4.0", + "@type": "PackageDependencyGroup", + "Dependencies": [], + "TargetFramework": ".NETFramework4.0" + }, + { + "@id": "https://api.nuget.org/v3/catalog0/data/2021.02.19.21.16.19/portable.bouncycastle.1.8.10.json#dependencygroup/.netstandard2.0", + "@type": "PackageDependencyGroup", + "Dependencies": [], + "TargetFramework": ".NETStandard2.0" + } + ] } } \ No newline at end of file diff --git a/tools/LotsenApp.LicenseManager/LotsenApp.LicenseManager.csproj b/tools/LotsenApp.LicenseManager/LotsenApp.LicenseManager.csproj index f09311c..df84854 100644 --- a/tools/LotsenApp.LicenseManager/LotsenApp.LicenseManager.csproj +++ b/tools/LotsenApp.LicenseManager/LotsenApp.LicenseManager.csproj @@ -45,7 +45,7 @@ - +