Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libs/zbxsysinfo/linux/net_if_in.yaml')
-rw-r--r--tests/libs/zbxsysinfo/linux/net_if_in.yaml163
1 files changed, 163 insertions, 0 deletions
diff --git a/tests/libs/zbxsysinfo/linux/net_if_in.yaml b/tests/libs/zbxsysinfo/linux/net_if_in.yaml
new file mode 100644
index 00000000000..564da0c2b1e
--- /dev/null
+++ b/tests/libs/zbxsysinfo/linux/net_if_in.yaml
@@ -0,0 +1,163 @@
+---
+test case: "#1.1 successfully read 'bytes'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,bytes]'
+out:
+ result: '1395994481'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.2 successfully read 'packets'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,packets]'
+out:
+ result: '5343265'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.3 successfully read 'errors'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 2 0 0 0 0 83760 111280259 741237 1 0 0 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,errors]'
+out:
+ result: '2'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.4 successfully read 'dropped'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 2 0 0 0 83760 111280259 741237 0 1 0 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,dropped]'
+out:
+ result: '2'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.5 successfully read 'overruns'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,overruns]'
+out:
+ result: '2'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.6 successfully read 'frame'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 0 2 0 83760 111280259 741237 0 0 0 0 0 1
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,frame]'
+out:
+ result: '2'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.7 successfully read 'compressed'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 0 0 2 83760 111280259 741237 0 0 0 0 0 1
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,compressed]'
+out:
+ result: '2'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#1.8 successfully read 'multicast'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 0 0 2 83760 111280259 741237 0 0 0 0 0 1
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,multicast]'
+out:
+ result: '83760'
+ return: 'SYSINFO_RET_OK'
+
+
+---
+test case: "#2.1 unsuccessfully read 'Too many parameters.'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,overruns,XXX]'
+out:
+ result: 'Too many parameters.'
+ return: 'SYSINFO_RET_FAIL'
+
+
+---
+test case: "#2.2 unsuccessfully read 'Cannot find information'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[enoX,overruns]'
+out:
+ result: 'Cannot find information for this network interface in /proc/net/dev.'
+ return: 'SYSINFO_RET_FAIL'
+
+
+---
+test case: "#2.3 unsuccessfully read 'Invalid second parameter.'"
+files:
+ /proc/net/dev: |
+ Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0
+ lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0
+in:
+ param: 'net.if.in[eno1,XXX]'
+out:
+ result: 'Invalid second parameter.'
+ return: 'SYSINFO_RET_FAIL'