mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-20 03:29:05 +02:00
mi: validate unmarshal target before querying and unit-test setField (#2520)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7d5342749a
commit
94dc2c0284
@@ -65,9 +65,3 @@ func TestGetValue_CHAR16(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Note: The CHAR16 unmarshal branch in unmarshalInstance (session.go) handles
|
||||
// string and uint fields. Integration testing of this path requires a WMI class
|
||||
// with a CHAR16 property, which is extremely rare. The setUintField and
|
||||
// setIntField helpers used by the branch are covered by the signed/unsigned
|
||||
// integer tests (Test_MI_QueryUnmarshal_SignedInt, Test_MI_Unmarshal_TypeMismatch).
|
||||
|
||||
Reference in New Issue
Block a user