diff --git a/CaddyManager.Tests/Services/Caddy/CaddyConfigurationParsingServiceTests.cs b/CaddyManager.Tests/Services/Caddy/CaddyConfigurationParsingServiceTests.cs index f997a8d..218488c 100644 --- a/CaddyManager.Tests/Services/Caddy/CaddyConfigurationParsingServiceTests.cs +++ b/CaddyManager.Tests/Services/Caddy/CaddyConfigurationParsingServiceTests.cs @@ -664,36 +664,5 @@ api.test { stopwatch.ElapsedMilliseconds.Should().BeLessThan(1000); // Should process in under 1 second } - /// - /// Tests the parsing issue where the provided configuration is incorrectly parsed as 2 sites and 0 ports - /// instead of 1 site and 1 port. - /// - [Fact] - public void GetHostnamesAndPortsFromCaddyfileContent_WithProvidedConfiguration_ReturnsCorrectSiteAndPort() - { - // Arrange - var caddyfileContent = @"pika-auth.duydao.org { - reverse_proxy pikachu:3011 { - header_down X-Frame-Options """" - } - encode zstd gzip -}"; - - // Act - var hostnames = _service.GetHostnamesFromCaddyfileContent(caddyfileContent); - var ports = _service.GetReverseProxyPortsFromCaddyfileContent(caddyfileContent); - - // Assert - Should have 1 site and 1 port - hostnames.Should().NotBeNull(); - hostnames.Should().HaveCount(1); - hostnames.Should().Contain("pika-auth.duydao.org"); - - ports.Should().NotBeNull(); - ports.Should().HaveCount(1); - ports.Should().Contain(3011); - } - - - #endregion } \ No newline at end of file