LCOV - code coverage report
Current view: top level - src - testainers_http_https_echo.dart (source / functions) Coverage Total Hit
Test: testainers Lines: 100.0 % 9 9
Test Date: 2026-05-24 17:06:20 Functions: - 0 0

            Line data    Source code
       1              : import 'package:testainers/src/testainers_base.dart';
       2              : import 'package:testainers/src/testainers_utils.dart';
       3              : 
       4              : class TestainersHttpHttpsEcho extends Testainers {
       5              :   int? _httpPort;
       6              :   int? _httpsPort;
       7              : 
       8            1 :   TestainersHttpHttpsEcho({
       9              :     int? httpPort,
      10              :     int? httpsPort,
      11              :     super.config,
      12              :     super.name,
      13              :     super.image = 'mendhak/http-https-echo',
      14              :     super.tag = 'latest',
      15              :     super.ports = const <int, int>{},
      16              :     super.env = const <String, String>{},
      17              :     super.detached = true,
      18              :     super.remove = true,
      19              :     super.links,
      20              :     super.networks,
      21              :     super.healthCmd,
      22              :     super.healthInterval,
      23              :     super.healthRetries,
      24              :     super.healthTimeout,
      25              :     super.healthStartPeriod,
      26              :     super.noHealthcheck,
      27              :     super.stopTime,
      28              :   })  : _httpPort = httpPort,
      29              :         _httpsPort = httpsPort;
      30              : 
      31            2 :   int get httpPort => _httpPort ?? -1;
      32              : 
      33            2 :   int get httpsPort => _httpsPort ?? -1;
      34              : 
      35            1 :   @override
      36              :   Future<Map<int, int>> portsFilter(Map<int, int> ports) async {
      37            2 :     _httpPort ??= await TestainersUtils.generatePort();
      38            2 :     _httpsPort ??= await TestainersUtils.generatePort();
      39              : 
      40            1 :     return <int, int>{
      41              :       ...ports,
      42            2 :       _httpPort!: 8080,
      43            2 :       _httpsPort!: 8443,
      44              :     };
      45              :   }
      46              : }
        

Generated by: LCOV version 2.0-1