Skip to content

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

Notifications You must be signed in to change notification settings

MarkTLite/chat-cli-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages