+
+ // Extract the host and port
+ capifHost := parsedCapifURL.Hostname()
+ capifPort := parsedCapifURL.Port()
+
+ // Set up the mock config reader with the desired configuration for testing
+ mockConfigReader = &envreader.MockConfigReader{
+ MockedConfig: map[string]string{
+ "KONG_DOMAIN": "kong",
+ "KONG_PROTOCOL": "http",
+ "KONG_IPV4": mockKongHost,
+ "KONG_DATA_PLANE_PORT": "32080",
+ "KONG_CONTROL_PLANE_PORT": mockKongControlPlanePort,
+ "CAPIF_PROTOCOL": "http",
+ "CAPIF_IPV4": capifHost,
+ "CAPIF_PORT": capifPort,
+ "LOG_LEVEL": "Info",
+ "SERVICE_MANAGER_PORT": "8095",
+ "TEST_SERVICE_IPV4": "10.101.1.101",
+ "TEST_SERVICE_PORT": "30951",
+ },
+ }
+
+ // Use the mock implementation for testing
+ myEnv, myPorts, err := mockConfigReader.ReadDotEnv()