Fix test compilation: make device_id field public
This commit is contained in:
parent
2850f4f68f
commit
7882e6b726
2 changed files with 3 additions and 3 deletions
|
|
@ -44,7 +44,7 @@ impl std::fmt::Debug for DeviceConfig {
|
|||
|
||||
/// Per-device polling thread that uses C FFI to libnetsnmp
|
||||
pub struct DevicePoller {
|
||||
device_id: String,
|
||||
pub device_id: String,
|
||||
config: DeviceConfig,
|
||||
request_tx: mpsc::UnboundedSender<SnmpRequest>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ mod tests {
|
|||
// Create a poller
|
||||
let poller = registry.get_or_create("test-device".to_string(), config);
|
||||
assert_eq!(registry.count(), 1);
|
||||
assert_eq!(poller.device_id(), "test-device");
|
||||
assert_eq!(poller.device_id, "test-device");
|
||||
|
||||
// Remove the poller
|
||||
let removed_ip = registry.remove("test-device");
|
||||
|
|
@ -145,7 +145,7 @@ mod tests {
|
|||
let poller = DevicePoller::spawn("test-device".to_string(), config.clone());
|
||||
|
||||
// Test accessors
|
||||
assert_eq!(poller.device_id(), "test-device");
|
||||
assert_eq!(poller.device_id, "test-device");
|
||||
assert_eq!(poller.config().ip, "192.168.1.1");
|
||||
assert_eq!(poller.config().port, 161);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue