MarkTLite / chat-cli-kafka

A chat cli, Practiced using message brokers - kafka in this case, CI added

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CHAT CLI

codecov Test status Build Status

Description

A command-line-driven program that allows message exchange. Uses kafka as a message broker.

Usage

With one instance of the program, you can run the command:
python main.py send --channel test-topic --server “localhost:9092”

With a second instance of the same program
python main.py receive --channel test-topic --_from start --server “localhost:9092”

Additional Information

You can run both instances at the same time in different terminals to test producing and receiving the messages

Testing

Mock testing was applied since a third party service - kafka is involved and to dictate values so as to increase code coverage by touching all decision points of the code.

To run the tests:

  1. Install coverage
pip install coverage
  1. Run this:
coverage run -m unittest
  1. To check code coverage:
coverage report

About

A chat cli, Practiced using message brokers - kafka in this case, CI added


Languages

Language:Python 100.0%