Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

1.2 KiB

Bridge Service Tests - Quick Reference

Quick Start

Run all unit tests (fast, no external dependencies):

go test ./tests/bridge/... -short

Run with verbose output:

go test ./tests/bridge/... -short -v

Test Commands

Command Description
go test ./tests/bridge/... -short Run unit tests only
go test ./tests/bridge/... Run all tests (requires Kafka)
go test ./tests/bridge/... -v Verbose output
go test ./tests/bridge/... -run TestName Run specific test
go test ./tests/bridge/... -cover With coverage

Test Structure

tests/bridge/
├── bridge_test.go          # Extracted main functions
├── mqtt_handler_test.go    # MQTT message handling tests
├── event_loop_test.go      # Event loop logic tests
├── integration_test.go     # Integration tests
├── testutil.go            # Test utilities
└── README.md             # Detailed documentation

All Tests Pass

  • 13 unit tests
  • 4 integration tests (skipped with -short)
  • 0 failures
  • ~0.2s execution time

For More Details

See tests/bridge/README.md for comprehensive documentation.