mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
add osx tests
This commit is contained in:
1
tests/fixtures/osx-10.11.6/df-h.json
vendored
Normal file
1
tests/fixtures/osx-10.11.6/df-h.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"filesystem": "/dev/disk1s1", "size": "466Gi", "used": null, "iused": 674413, "ifree": 9223372036854101394, "mounted_on": "/", "available": null, "capacity_percent": 30, "iused_percent": 0}, {"filesystem": "devfs", "size": "188Ki", "used": null, "iused": 650, "ifree": 0, "mounted_on": "/dev", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk1s4", "size": "466Gi", "used": null, "iused": 2, "ifree": 9223372036854775805, "mounted_on": "/private/var/vm", "available": null, "capacity_percent": 1, "iused_percent": 0}, {"filesystem": "map -hosts", "size": "0Bi", "used": null, "iused": 0, "ifree": 0, "mounted_on": "/net", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "map auto_home", "size": "0Bi", "used": null, "iused": 0, "ifree": 0, "mounted_on": "/home", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil", "size": "3.5Ti", "used": null, "iused": 301134832, "ifree": 649465741, "mounted_on": "/Volumes/brazil", "available": null, "capacity_percent": 32, "iused_percent": 32}]
|
7
tests/fixtures/osx-10.11.6/df-h.out
vendored
Executable file
7
tests/fixtures/osx-10.11.6/df-h.out
vendored
Executable file
@ -0,0 +1,7 @@
|
||||
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
|
||||
/dev/disk1s1 466Gi 137Gi 326Gi 30% 674413 9223372036854101394 0% /
|
||||
devfs 188Ki 188Ki 0Bi 100% 650 0 100% /dev
|
||||
/dev/disk1s4 466Gi 2.0Gi 326Gi 1% 2 9223372036854775805 0% /private/var/vm
|
||||
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
|
||||
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
|
||||
//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil 3.5Ti 1.1Ti 2.4Ti 32% 301134832 649465741 32% /Volumes/brazil
|
1
tests/fixtures/osx-10.11.6/df.json
vendored
Normal file
1
tests/fixtures/osx-10.11.6/df.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"filesystem": "/dev/disk1s1", "512_blocks": 976490576, "used": 286747768, "available": 684150392, "iused": 674410, "ifree": 9223372036854101397, "mounted_on": "/", "capacity_percent": 30, "iused_percent": 0}, {"filesystem": "devfs", "512_blocks": 375, "used": 375, "available": 0, "iused": 650, "ifree": 0, "mounted_on": "/dev", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk1s4", "512_blocks": 976490576, "used": 4194344, "available": 684150392, "iused": 2, "ifree": 9223372036854775805, "mounted_on": "/private/var/vm", "capacity_percent": 1, "iused_percent": 0}, {"filesystem": "map -hosts", "512_blocks": 0, "used": 0, "available": 0, "iused": 0, "ifree": 0, "mounted_on": "/net", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "map auto_home", "512_blocks": 0, "used": 0, "available": 0, "iused": 0, "ifree": 0, "mounted_on": "/home", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil", "512_blocks": 7604804600, "used": 2409078672, "available": 5195725928, "iused": 301134832, "ifree": 649465741, "mounted_on": "/Volumes/brazil", "capacity_percent": 32, "iused_percent": 32}]
|
7
tests/fixtures/osx-10.11.6/df.out
vendored
Executable file
7
tests/fixtures/osx-10.11.6/df.out
vendored
Executable file
@ -0,0 +1,7 @@
|
||||
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
|
||||
/dev/disk1s1 976490576 286747768 684150392 30% 674410 9223372036854101397 0% /
|
||||
devfs 375 375 0 100% 650 0 100% /dev
|
||||
/dev/disk1s4 976490576 4194344 684150392 1% 2 9223372036854775805 0% /private/var/vm
|
||||
map -hosts 0 0 0 100% 0 0 100% /net
|
||||
map auto_home 0 0 0 100% 0 0 100% /home
|
||||
//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil 7604804600 2409078672 5195725928 32% 301134832 649465741 32% /Volumes/brazil
|
1
tests/fixtures/osx-10.11.6/dig-aaaa.json
vendored
Normal file
1
tests/fixtures/osx-10.11.6/dig-aaaa.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 41369, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "www.google.com.", "class": "IN", "type": "AAAA"}, "answer": [{"name": "www.google.com.", "class": "IN", "type": "AAAA", "ttl": 197, "data": "2607:f8b0:4000:817::2004"}], "query_time": 30, "server": "2600", "when": "Wed Dec 11 16:57:37 PST 2019", "rcvd": 71}]
|
20
tests/fixtures/osx-10.11.6/dig-aaaa.out
vendored
Executable file
20
tests/fixtures/osx-10.11.6/dig-aaaa.out
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> www.google.com AAAA
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41369
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.google.com. IN AAAA
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.google.com. 197 IN AAAA 2607:f8b0:4000:817::2004
|
||||
|
||||
;; Query time: 30 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:57:37 PST 2019
|
||||
;; MSG SIZE rcvd: 71
|
||||
|
1
tests/fixtures/osx-10.11.6/dig-x.json
vendored
Normal file
1
tests/fixtures/osx-10.11.6/dig-x.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 15549, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "1.1.1.1.in-addr.arpa.", "class": "IN", "type": "PTR"}, "answer": [{"name": "1.1.1.1.in-addr.arpa.", "class": "IN", "type": "PTR", "ttl": 1800, "data": "one.one.one.one."}], "query_time": 34, "server": "2600", "when": "Wed Dec 11 16:57:37 PST 2019", "rcvd": 78}]
|
20
tests/fixtures/osx-10.11.6/dig-x.out
vendored
Executable file
20
tests/fixtures/osx-10.11.6/dig-x.out
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> -x 1.1.1.1
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15549
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;1.1.1.1.in-addr.arpa. IN PTR
|
||||
|
||||
;; ANSWER SECTION:
|
||||
1.1.1.1.in-addr.arpa. 1800 IN PTR one.one.one.one.
|
||||
|
||||
;; Query time: 34 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:57:37 PST 2019
|
||||
;; MSG SIZE rcvd: 78
|
||||
|
1
tests/fixtures/osx-10.11.6/dig.json
vendored
Normal file
1
tests/fixtures/osx-10.11.6/dig.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 57483, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 5, "authority_num": 0, "additional_num": 1, "question": {"name": "www.cnn.com.", "class": "IN", "type": "A"}, "answer": [{"name": "www.cnn.com.", "class": "IN", "type": "CNAME", "ttl": 199, "data": "turner-tls.map.fastly.net."}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 13, "data": "151.101.193.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 13, "data": "151.101.65.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 13, "data": "151.101.1.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 13, "data": "151.101.129.67"}], "query_time": 30, "server": "2600", "when": "Wed Dec 11 16:57:37 PST 2019", "rcvd": 143}, {"id": 53268, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "www.google.com.", "class": "IN", "type": "A"}, "answer": [{"name": "www.google.com.", "class": "IN", "type": "A", "ttl": 194, "data": "172.217.9.164"}], "query_time": 30, "server": "2600", "when": "Wed Dec 11 16:57:37 PST 2019", "rcvd": 59}]
|
41
tests/fixtures/osx-10.11.6/dig.out
vendored
Executable file
41
tests/fixtures/osx-10.11.6/dig.out
vendored
Executable file
@ -0,0 +1,41 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> www.cnn.com www.google.com
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57483
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.cnn.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.cnn.com. 199 IN CNAME turner-tls.map.fastly.net.
|
||||
turner-tls.map.fastly.net. 13 IN A 151.101.193.67
|
||||
turner-tls.map.fastly.net. 13 IN A 151.101.65.67
|
||||
turner-tls.map.fastly.net. 13 IN A 151.101.1.67
|
||||
turner-tls.map.fastly.net. 13 IN A 151.101.129.67
|
||||
|
||||
;; Query time: 30 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:57:37 PST 2019
|
||||
;; MSG SIZE rcvd: 143
|
||||
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53268
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.google.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.google.com. 194 IN A 172.217.9.164
|
||||
|
||||
;; Query time: 30 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:57:37 PST 2019
|
||||
;; MSG SIZE rcvd: 59
|
||||
|
1
tests/fixtures/osx-10.14.6/df-h.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/df-h.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"filesystem": "/dev/disk1s1", "size": "466Gi", "used": null, "iused": 1507697, "ifree": 9223372036853268110, "mounted_on": "/", "available": null, "capacity_percent": 32, "iused_percent": 0}, {"filesystem": "devfs", "size": "334Ki", "used": null, "iused": 1154, "ifree": 0, "mounted_on": "/dev", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk1s4", "size": "466Gi", "used": null, "iused": 6, "ifree": 9223372036854775801, "mounted_on": "/private/var/vm", "available": null, "capacity_percent": 2, "iused_percent": 0}, {"filesystem": "map -hosts", "size": "0Bi", "used": null, "iused": 0, "ifree": 0, "mounted_on": "/net", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "map auto_home", "size": "0Bi", "used": null, "iused": 0, "ifree": 0, "mounted_on": "/home", "available": null, "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk2s2", "size": "6.9Gi", "used": null, "iused": 8, "ifree": 4294967271, "mounted_on": "/Volumes/InstallESD", "available": null, "capacity_percent": 76, "iused_percent": 0}, {"filesystem": "com.apple.TimeMachine.2019-11-29-075900@/dev/disk1s1", "size": "466Gi", "used": null, "iused": 1459164, "ifree": 9223372036853316643, "mounted_on": "/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/kbrazil-mac/2019-11-29-075900/Macintosh HD", "available": null, "capacity_percent": 30, "iused_percent": 0}, {"filesystem": "//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil", "size": "3.5Ti", "used": null, "iused": 301134832, "ifree": 649465741, "mounted_on": "/Volumes/brazil", "available": null, "capacity_percent": 32, "iused_percent": 32}]
|
9
tests/fixtures/osx-10.14.6/df-h.out
vendored
Normal file
9
tests/fixtures/osx-10.14.6/df-h.out
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
|
||||
/dev/disk1s1 466Gi 144Gi 315Gi 32% 1507697 9223372036853268110 0% /
|
||||
devfs 334Ki 334Ki 0Bi 100% 1154 0 100% /dev
|
||||
/dev/disk1s4 466Gi 6.0Gi 315Gi 2% 6 9223372036854775801 0% /private/var/vm
|
||||
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
|
||||
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
|
||||
/dev/disk2s2 6.9Gi 5.2Gi 1.7Gi 76% 8 4294967271 0% /Volumes/InstallESD
|
||||
com.apple.TimeMachine.2019-11-29-075900@/dev/disk1s1 466Gi 132Gi 315Gi 30% 1459164 9223372036853316643 0% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/kbrazil-mac/2019-11-29-075900/Macintosh HD
|
||||
//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil 3.5Ti 1.1Ti 2.4Ti 32% 301134832 649465741 32% /Volumes/brazil
|
1
tests/fixtures/osx-10.14.6/df.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/df.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"filesystem": "/dev/disk1s1", "512_blocks": 976490576, "used": 302197928, "available": 660310352, "iused": 1507695, "ifree": 9223372036853268112, "mounted_on": "/", "capacity_percent": 32, "iused_percent": 0}, {"filesystem": "devfs", "512_blocks": 667, "used": 667, "available": 0, "iused": 1154, "ifree": 0, "mounted_on": "/dev", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk1s4", "512_blocks": 976490576, "used": 12583000, "available": 660310352, "iused": 6, "ifree": 9223372036854775801, "mounted_on": "/private/var/vm", "capacity_percent": 2, "iused_percent": 0}, {"filesystem": "map -hosts", "512_blocks": 0, "used": 0, "available": 0, "iused": 0, "ifree": 0, "mounted_on": "/net", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "map auto_home", "512_blocks": 0, "used": 0, "available": 0, "iused": 0, "ifree": 0, "mounted_on": "/home", "capacity_percent": 100, "iused_percent": 100}, {"filesystem": "/dev/disk2s2", "512_blocks": 14463464, "used": 10887304, "available": 3576160, "iused": 8, "ifree": 4294967271, "mounted_on": "/Volumes/InstallESD", "capacity_percent": 76, "iused_percent": 0}, {"filesystem": "com.apple.TimeMachine.2019-11-29-075900@/dev/disk1s1", "512_blocks": 976490576, "used": 277166752, "available": 660310352, "iused": 1459164, "ifree": 9223372036853316643, "mounted_on": "/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/kbrazil-mac/2019-11-29-075900/Macintosh HD", "capacity_percent": 30, "iused_percent": 0}, {"filesystem": "//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil", "512_blocks": 7604804600, "used": 2409078672, "available": 5195725928, "iused": 301134832, "ifree": 649465741, "mounted_on": "/Volumes/brazil", "capacity_percent": 32, "iused_percent": 32}]
|
9
tests/fixtures/osx-10.14.6/df.out
vendored
Normal file
9
tests/fixtures/osx-10.14.6/df.out
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
|
||||
/dev/disk1s1 976490576 302197928 660310352 32% 1507695 9223372036853268112 0% /
|
||||
devfs 667 667 0 100% 1154 0 100% /dev
|
||||
/dev/disk1s4 976490576 12583000 660310352 2% 6 9223372036854775801 0% /private/var/vm
|
||||
map -hosts 0 0 0 100% 0 0 100% /net
|
||||
map auto_home 0 0 0 100% 0 0 100% /home
|
||||
/dev/disk2s2 14463464 10887304 3576160 76% 8 4294967271 0% /Volumes/InstallESD
|
||||
com.apple.TimeMachine.2019-11-29-075900@/dev/disk1s1 976490576 277166752 660310352 30% 1459164 9223372036853316643 0% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/kbrazil-mac/2019-11-29-075900/Macintosh HD
|
||||
//brazil@MyCloudEX2Ultra._afpovertcp._tcp.local/brazil 7604804600 2409078672 5195725928 32% 301134832 649465741 32% /Volumes/brazil
|
1
tests/fixtures/osx-10.14.6/dig-aaaa.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/dig-aaaa.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 61441, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "www.google.com.", "class": "IN", "type": "AAAA"}, "answer": [{"name": "www.google.com.", "class": "IN", "type": "AAAA", "ttl": 63, "data": "2607:f8b0:4000:817::2004"}], "query_time": 30, "server": "2600", "when": "Wed Dec 11 16:54:50 PST 2019", "rcvd": 71}]
|
20
tests/fixtures/osx-10.14.6/dig-aaaa.out
vendored
Normal file
20
tests/fixtures/osx-10.14.6/dig-aaaa.out
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> www.google.com AAAA
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61441
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.google.com. IN AAAA
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.google.com. 63 IN AAAA 2607:f8b0:4000:817::2004
|
||||
|
||||
;; Query time: 30 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:54:50 PST 2019
|
||||
;; MSG SIZE rcvd: 71
|
||||
|
1
tests/fixtures/osx-10.14.6/dig-x.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/dig-x.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 27071, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "1.1.1.1.in-addr.arpa.", "class": "IN", "type": "PTR"}, "answer": [{"name": "1.1.1.1.in-addr.arpa.", "class": "IN", "type": "PTR", "ttl": 1800, "data": "one.one.one.one."}], "query_time": 39, "server": "2600", "when": "Wed Dec 11 16:54:51 PST 2019", "rcvd": 78}]
|
20
tests/fixtures/osx-10.14.6/dig-x.out
vendored
Normal file
20
tests/fixtures/osx-10.14.6/dig-x.out
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> -x 1.1.1.1
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27071
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;1.1.1.1.in-addr.arpa. IN PTR
|
||||
|
||||
;; ANSWER SECTION:
|
||||
1.1.1.1.in-addr.arpa. 1800 IN PTR one.one.one.one.
|
||||
|
||||
;; Query time: 39 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:54:51 PST 2019
|
||||
;; MSG SIZE rcvd: 78
|
||||
|
1
tests/fixtures/osx-10.14.6/dig.json
vendored
Normal file
1
tests/fixtures/osx-10.14.6/dig.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"id": 54065, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 5, "authority_num": 0, "additional_num": 1, "question": {"name": "www.cnn.com.", "class": "IN", "type": "A"}, "answer": [{"name": "www.cnn.com.", "class": "IN", "type": "CNAME", "ttl": 72, "data": "turner-tls.map.fastly.net."}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 1, "data": "151.101.65.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 1, "data": "151.101.1.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 1, "data": "151.101.193.67"}, {"name": "turner-tls.map.fastly.net.", "class": "IN", "type": "A", "ttl": 1, "data": "151.101.129.67"}], "query_time": 41, "server": "2600", "when": "Wed Dec 11 16:54:50 PST 2019", "rcvd": 143}, {"id": 64484, "opcode": "QUERY", "status": "NOERROR", "flags": ["qr", "rd", "ra"], "query_num": 1, "answer_num": 1, "authority_num": 0, "additional_num": 1, "question": {"name": "www.google.com.", "class": "IN", "type": "A"}, "answer": [{"name": "www.google.com.", "class": "IN", "type": "A", "ttl": 64, "data": "172.217.12.68"}], "query_time": 31, "server": "2600", "when": "Wed Dec 11 16:54:50 PST 2019", "rcvd": 59}]
|
41
tests/fixtures/osx-10.14.6/dig.out
vendored
Normal file
41
tests/fixtures/osx-10.14.6/dig.out
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
; <<>> DiG 9.10.6 <<>> www.cnn.com www.google.com
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54065
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.cnn.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.cnn.com. 72 IN CNAME turner-tls.map.fastly.net.
|
||||
turner-tls.map.fastly.net. 1 IN A 151.101.65.67
|
||||
turner-tls.map.fastly.net. 1 IN A 151.101.1.67
|
||||
turner-tls.map.fastly.net. 1 IN A 151.101.193.67
|
||||
turner-tls.map.fastly.net. 1 IN A 151.101.129.67
|
||||
|
||||
;; Query time: 41 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:54:50 PST 2019
|
||||
;; MSG SIZE rcvd: 143
|
||||
|
||||
;; Got answer:
|
||||
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64484
|
||||
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
|
||||
|
||||
;; OPT PSEUDOSECTION:
|
||||
; EDNS: version: 0, flags:; udp: 4096
|
||||
;; QUESTION SECTION:
|
||||
;www.google.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.google.com. 64 IN A 172.217.12.68
|
||||
|
||||
;; Query time: 31 msec
|
||||
;; SERVER: 2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)
|
||||
;; WHEN: Wed Dec 11 16:54:50 PST 2019
|
||||
;; MSG SIZE rcvd: 59
|
||||
|
@ -16,12 +16,24 @@ class MyTests(unittest.TestCase):
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/df.out'), 'r') as f:
|
||||
self.ubuntu_18_4_df = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/df.out'), 'r') as f:
|
||||
self.osx_10_11_6_df = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/df.out'), 'r') as f:
|
||||
self.osx_10_14_6_df = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/df-h.out'), 'r') as f:
|
||||
self.centos_7_7_df_h = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/df-h.out'), 'r') as f:
|
||||
self.ubuntu_18_4_df_h = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/df-h.out'), 'r') as f:
|
||||
self.osx_10_11_6_df_h = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/df-h.out'), 'r') as f:
|
||||
self.osx_10_14_6_df_h = f.read()
|
||||
|
||||
# output
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/df.json'), 'r') as f:
|
||||
self.centos_7_7_df_json = json.loads(f.read())
|
||||
@ -29,12 +41,24 @@ class MyTests(unittest.TestCase):
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/df.json'), 'r') as f:
|
||||
self.ubuntu_18_4_df_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/df.json'), 'r') as f:
|
||||
self.osx_10_11_6_df_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/df.json'), 'r') as f:
|
||||
self.osx_10_14_6_df_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/df-h.json'), 'r') as f:
|
||||
self.centos_7_7_df_h_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/df-h.json'), 'r') as f:
|
||||
self.ubuntu_18_4_df_h_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/df-h.json'), 'r') as f:
|
||||
self.osx_10_11_6_df_h_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/df-h.json'), 'r') as f:
|
||||
self.osx_10_14_6_df_h_json = json.loads(f.read())
|
||||
|
||||
def test_df_centos_7_7(self):
|
||||
"""
|
||||
Test plain 'df' on Centos 7.7
|
||||
@ -47,18 +71,42 @@ class MyTests(unittest.TestCase):
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.ubuntu_18_4_df, quiet=True), self.ubuntu_18_4_df_json)
|
||||
|
||||
def test_df_osx_10_11_6(self):
|
||||
"""
|
||||
Test plain 'df' on OSX 10.11.6
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.osx_10_11_6_df, quiet=True), self.osx_10_11_6_df_json)
|
||||
|
||||
def test_df_osx_10_14_6(self):
|
||||
"""
|
||||
Test plain 'df' on OSX 10.14.6
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.osx_10_14_6_df, quiet=True), self.osx_10_14_6_df_json)
|
||||
|
||||
def test_df_h_centos_7_7(self):
|
||||
"""
|
||||
Test plain 'df -h' on Centos 7.7
|
||||
Test 'df -h' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.centos_7_7_df_h, quiet=True), self.centos_7_7_df_h_json)
|
||||
|
||||
def test_df_h_ubuntu_18_4(self):
|
||||
"""
|
||||
Test plain 'df -h' on Ubuntu 18.4
|
||||
Test 'df -h' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.ubuntu_18_4_df_h, quiet=True), self.ubuntu_18_4_df_h_json)
|
||||
|
||||
def test_df_h_osx_10_11_6(self):
|
||||
"""
|
||||
Test 'df -h' on OSX 10.11.6
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.osx_10_11_6_df_h, quiet=True), self.osx_10_11_6_df_h_json)
|
||||
|
||||
def test_df_h_osx_10_14_6(self):
|
||||
"""
|
||||
Test 'df -h' on OSX 10.14.6
|
||||
"""
|
||||
self.assertEqual(jc.parsers.df.parse(self.osx_10_14_6_df_h, quiet=True), self.osx_10_14_6_df_h_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user