update container port mapping

This commit is contained in:
2026-03-21 19:58:55 +01:00
parent 21265a649b
commit 61e840a3f0
10 changed files with 139 additions and 34 deletions

View File

@@ -109,7 +109,7 @@ func createTestData(t *testing.T, tempDir string) *TestData {
configFiles := map[string]string{
"configuration.json": `{
"udpPort": "9231",
"tcpPort": "9232",
"tcpPort": "9231",
"maxConnections": "30",
"lanDiscovery": "1",
"registerToLobby": "1",
@@ -198,7 +198,7 @@ func createTestData(t *testing.T, tempDir string) *TestData {
sampleConfig := &model.Configuration{
UdpPort: model.IntString(9231),
TcpPort: model.IntString(9232),
TcpPort: model.IntString(9231),
MaxConnections: model.IntString(30),
LanDiscovery: model.IntString(1),
RegisterToLobby: model.IntString(1),

View File

@@ -294,7 +294,7 @@ func TestController_ConfigurationModel_JSONSerialization(t *testing.T) {
app.Get("/config", func(c *fiber.Ctx) error {
config := &model.Configuration{
UdpPort: model.IntString(9231),
TcpPort: model.IntString(9232),
TcpPort: model.IntString(9231),
MaxConnections: model.IntString(30),
LanDiscovery: model.IntString(1),
RegisterToLobby: model.IntString(1),
@@ -316,7 +316,7 @@ func TestController_ConfigurationModel_JSONSerialization(t *testing.T) {
tests.AssertNoError(t, err)
tests.AssertEqual(t, model.IntString(9231), response.UdpPort)
tests.AssertEqual(t, model.IntString(9232), response.TcpPort)
tests.AssertEqual(t, model.IntString(9231), response.TcpPort)
tests.AssertEqual(t, model.IntString(30), response.MaxConnections)
tests.AssertEqual(t, model.IntString(1), response.LanDiscovery)
tests.AssertEqual(t, model.IntString(1), response.RegisterToLobby)

View File

@@ -464,7 +464,7 @@ func TestServerConfigCache_Configuration(t *testing.T) {
serverID := uuid.New().String()
configuration := model.Configuration{
UdpPort: model.IntString(9231),
TcpPort: model.IntString(9232),
TcpPort: model.IntString(9231),
MaxConnections: model.IntString(30),
LanDiscovery: model.IntString(1),
RegisterToLobby: model.IntString(1),

View File

@@ -27,7 +27,7 @@ func TestConfigService_GetConfiguration_ValidFile(t *testing.T) {
tests.AssertNotNil(t, config)
tests.AssertEqual(t, model.IntString(9231), config.UdpPort)
tests.AssertEqual(t, model.IntString(9232), config.TcpPort)
tests.AssertEqual(t, model.IntString(9231), config.TcpPort)
tests.AssertEqual(t, model.IntString(30), config.MaxConnections)
tests.AssertEqual(t, model.IntString(1), config.LanDiscovery)
tests.AssertEqual(t, model.IntString(1), config.RegisterToLobby)
@@ -122,7 +122,7 @@ func TestConfigService_LoadConfigs_Success(t *testing.T) {
tests.AssertNotNil(t, configs)
tests.AssertEqual(t, model.IntString(9231), configs.Configuration.UdpPort)
tests.AssertEqual(t, model.IntString(9232), configs.Configuration.TcpPort)
tests.AssertEqual(t, model.IntString(9231), configs.Configuration.TcpPort)
tests.AssertEqual(t, "Test ACC Server", configs.Settings.ServerName)
tests.AssertEqual(t, "admin123", configs.Settings.AdminPassword)
tests.AssertEqual(t, "spa", configs.Event.Track)
@@ -264,7 +264,7 @@ func TestConfigService_Caching_Configuration(t *testing.T) {
tests.AssertNotNil(t, config2)
tests.AssertEqual(t, model.IntString(9231), config2.UdpPort)
tests.AssertEqual(t, model.IntString(9232), config2.TcpPort)
tests.AssertEqual(t, model.IntString(9231), config2.TcpPort)
}
func TestConfigService_Caching_EventConfig(t *testing.T) {