Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed Sep 29, 2020
1 parent 65f793b commit 3e9f914
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
run: |
sudo python3 -m pip install dnslib protobuf pyyaml
sudo python3 -m pip install --upgrade dnspython
sudo python3 -m unittest tests.test_receiver_tcpsocket
sudo python3 -m unittest tests.test_receiver_tcpsocket -v
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Dnstap streams receiver

![Pypi](https://github.com/dmachard/dnstap_receiver/workflows/Publish%20to%20PyPI/badge.svg) ![Build](https://github.com/dmachard/dnsdist-console/workflows/Build/badge.svg) ![Testing](https://github.com/dmachard/dnstap_receiver/workflows/Testing/badge.svg)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dnstap_receiver)

Expand Down
2 changes: 0 additions & 2 deletions dnstap_receiver/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ async def cb_ondnstap(dnstap_decoder, payload, cfg, queue):
"""on dnstap"""
# decode binary payload
dnstap_decoder.ParseFromString(payload)

#dnstap_decoder.parse_from_bytes(payload)
dm = dnstap_decoder.message

# filtering by dnstap identity ?
Expand Down
4 changes: 0 additions & 4 deletions test_receiver.py

This file was deleted.

6 changes: 3 additions & 3 deletions tests/test_receiver_tcpsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
my_resolver.nameservers = ['127.0.0.1']

class TestRcvTCPsocket(unittest.TestCase):
def test_listening(self):
def test1_listening(self):
"""test listening tcp socket"""
cmd = ["python3", "-c",
"from dnstap_receiver.receiver import start_receiver; start_receiver()",
"-v"]

with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as proc:
time.sleep(1)
time.sleep(2)
proc.kill()

o = proc.stdout.read()
self.assertRegex(o, b"listening on")

def test_incoming_dnstap(self):
def test2_incoming_dnstap(self):
"""test to receive dnstap message"""
cmd = ["python3", "-c",
"from dnstap_receiver.receiver import start_receiver; start_receiver()"]
Expand Down

0 comments on commit 3e9f914

Please sign in to comment.