Add unit tests to make and some clean up

drew/mqtt-clients
Drew Bednar 3 months ago
parent 11839e6c7c
commit 5481f39c2b

@ -33,3 +33,6 @@ run-sub:
dev-logs:
docker logs mosquitto -f
.PHONEY: dev-logs
test:
go test -v ./...

@ -9,6 +9,8 @@ Learning MQTT with Golang by doing. This repo is a simple example of using a Gol
![mqtt-arch](./img/mqtt-architecture.svg)
Ideally I would like this application to resemble the above design. Conceptually, there
## Development
For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT broker, with TLS enabled.
@ -17,7 +19,6 @@ For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT bro
sudo apt install mosquitto-clients
```
First generate local development certs using:
```
@ -38,6 +39,20 @@ Stop the local development environment with:
make stop-dev
```
### Testing
Unit tests can be run with:
```
make test
```
Integration tests are run via:
```
make test-integration
```
## Usage
*Instructions TBD*

@ -1,5 +1,3 @@
version: "3.7"
services:
mosquitto:
image: eclipse-mosquitto:latest

@ -2,8 +2,9 @@ module git.runcible.io/learning/learn_mqtt_go
go 1.23.1
require github.com/eclipse/paho.mqtt.golang v1.5.0
require (
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sync v0.7.0 // indirect

Loading…
Cancel
Save