fix(network): read AP security flags in WiFi scan and unit-test parseAccessPoint
parseAccessPoint() is extracted from an anonymous namespace so the pure property->AccessPointInfo mapping is testable. getAccessPoints() now reads the Flags/WpaFlags/RsnFlags properties (they were never read, so every network was reported Open and connections lacked a security section) and fixes the double container-enter on the SSID 'ay' read that silently emptied the scan list.
This commit is contained in:
@@ -128,6 +128,20 @@ add_executable(test_network_unit
|
||||
target_include_directories(test_network_unit PRIVATE src)
|
||||
target_link_libraries(test_network_unit PRIVATE GTest::gtest_main)
|
||||
|
||||
# Access point parsing unit tests (pure mapping; the sd-bus reads are Linux-only)
|
||||
add_executable(test_nm_device
|
||||
tests/network/test_nm_device.cpp
|
||||
src/network/nm_device.cpp
|
||||
src/network/nm_connection.cpp
|
||||
src/logger/logger.cpp
|
||||
)
|
||||
target_include_directories(test_nm_device PRIVATE src)
|
||||
target_link_libraries(test_nm_device PRIVATE GTest::gtest_main)
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(test_nm_device PRIVATE ${SDBUS_LIBRARIES})
|
||||
target_include_directories(test_nm_device PRIVATE ${SDBUS_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Config unit tests
|
||||
add_executable(test_config
|
||||
tests/test_config.cpp
|
||||
|
||||
Reference in New Issue
Block a user