修正版本号
Build and publish Jiaowu packages and container image / Test, package and publish (push) Successful in 35m49s

This commit is contained in:
2026-08-02 18:05:45 +08:00 Unverified
parent 019b3fc827
commit fb812268d7
@@ -1,3 +1,4 @@
using System.Reflection;
using Jiaowu.Api.Controllers; using Jiaowu.Api.Controllers;
namespace Jiaowu.Api.Tests; namespace Jiaowu.Api.Tests;
@@ -8,7 +9,12 @@ public sealed class SystemControllerTests
public void GetVersion_ReturnsConfiguredApplicationVersion() public void GetVersion_ReturnsConfiguredApplicationVersion()
{ {
var response = new SystemController().GetVersion(); var response = new SystemController().GetVersion();
var configuredVersion = typeof(SystemController).Assembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!
.InformationalVersion
.Split('+', 2)[0];
Assert.Equal("1.0.0", response.Version); Assert.Equal(configuredVersion, response.Version);
Assert.Matches(@"^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$", response.Version);
} }
} }