Skip to content

Commit

Permalink
chore(deps): update
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Apr 14, 2024
1 parent d513828 commit 83c45bf
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 247 deletions.
6 changes: 3 additions & 3 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.0" />
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.8.0-rc.1" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.8.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.11" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.8.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.5" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.14" />
Expand All @@ -33,7 +33,7 @@
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageVersion Include="Serilog.Sinks.File.Archive" Version="1.0.5" />
<PackageVersion Include="MailKit" Version="4.4.0" />
<PackageVersion Include="MailKit" Version="4.5.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.4" />
Expand Down
13 changes: 2 additions & 11 deletions src/GZCTF.Test/AccountTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@

namespace GZCTF.Test;

public class AccountTest : IClassFixture<TestWebAppFactory>
public class AccountTest(TestWebAppFactory factory) : IClassFixture<TestWebAppFactory>
{
readonly TestWebAppFactory _factory;
readonly ITestOutputHelper _output;

public AccountTest(TestWebAppFactory factory, ITestOutputHelper output)
{
_factory = factory;
_output = output;
}

[Fact]
public async Task TestCreateUser()
{
using HttpClient client = _factory.CreateClient();
using HttpClient client = factory.CreateClient();
HttpResponseMessage registerResult = await client.PostAsJsonAsync("/api/account/register",
new { userName = "foo", password = "foo12345", email = "[email protected]" });
Assert.Equal(HttpStatusCode.BadRequest, registerResult.StatusCode);
Expand Down
9 changes: 1 addition & 8 deletions src/GZCTF.Test/ConfigServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@

namespace GZCTF.Test;

public class ConfigServiceTest
public class ConfigServiceTest(ITestOutputHelper output)
{
readonly ITestOutputHelper output;

public ConfigServiceTest(ITestOutputHelper _output)
{
output = _output;
}

[Fact]
public void TestGetConfigs()
{
Expand Down
77 changes: 0 additions & 77 deletions src/GZCTF.Test/ContainerServiceTest.cs

This file was deleted.

17 changes: 5 additions & 12 deletions src/GZCTF.Test/SignatureTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@

namespace GZCTF.Test;

public class SignatureTest
public class SignatureTest(ITestOutputHelper output)
{
readonly ITestOutputHelper output;

public SignatureTest(ITestOutputHelper _output)
{
output = _output;
}

[Fact]
public void Ed25519Test()
{
Expand Down Expand Up @@ -88,9 +81,9 @@ public void Ed25519WithXorTest()
}

[Fact]
public void Ed25519ctxTest()
public void Ed25519CtxTest()
{
var sAlgorithm = SignAlgorithm.Ed25519Ctx;
const SignAlgorithm sAlgorithm = SignAlgorithm.Ed25519Ctx;
var s = "Hello " + sAlgorithm;
output.WriteLine(s);
SecureRandom sr = new();
Expand Down Expand Up @@ -146,9 +139,9 @@ public void Ed448Test()
}

[Fact]
public void SHA512withRSATest()
public void SHA512WithRSATest()
{
var sAlgorithm = SignAlgorithm.SHA512WithRSA;
const SignAlgorithm sAlgorithm = SignAlgorithm.SHA512WithRSA;
var s = "Hello " + sAlgorithm;
output.WriteLine(s);
SecureRandom sr = new();
Expand Down
19 changes: 0 additions & 19 deletions src/GZCTF.Test/TestMailSender.cs

This file was deleted.

15 changes: 2 additions & 13 deletions src/GZCTF.Test/TestWebAppFactory.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
using System.Linq;
using GZCTF.Services.Interface;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Mvc.Testing;

namespace GZCTF.Test;

public class TestWebAppFactory : WebApplicationFactory<Program>
public abstract class TestWebAppFactory : WebApplicationFactory<Program>
{
static TestWebAppFactory()
{
Program.IsTesting = true;
}

protected override void ConfigureWebHost(IWebHostBuilder builder) =>
builder.ConfigureServices(services =>
{
services.Remove(services.Single(d => d.ServiceType == typeof(IMailSender)));
services.AddTransient<IMailSender, TestMailSender>();
});
}
6 changes: 3 additions & 3 deletions src/GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@types/katex": "^0.16.7",
"@types/node": "20.12.7",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@types/react": "^18.2.78",
"@types/react-dom": "^18.2.25",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitejs/plugin-react": "^4.2.1",
Expand All @@ -70,7 +70,7 @@
"form-data": "~4.0.0",
"lodash": "^4.17.21",
"prettier": "~3.2.5",
"rollup": "^4.14.1",
"rollup": "^4.14.2",
"swagger-typescript-api": "^13.0.3",
"tslib": "^2.6.2",
"typescript": "5.4.5",
Expand Down
Loading

0 comments on commit 83c45bf

Please sign in to comment.