Azure-Samples / Iot-Telemetry-Simulator

The IoT Telemetry Simulator allows you to test Azure IoT Hub or Eventhub ingestion at scale. The implementation is communicating with Azure IoT Hub using multiplexed AMQP connections. An automation library allows you to run it as load test as part of a CI/CD pipeline.
MIT License
68 stars 48 forks source link

Read proper Template environment variable when running a simulation. #2

Closed TechPreacher closed 4 years ago

TechPreacher commented 4 years ago

Purpose

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

docker run -it -e "IotHubConnectionString=xxx" -e DeviceList="sim000001,sim000002" -e Template="{ \"deviceId\": \"$.DeviceId\", \"temp\": \"$.Temp\" }" -e Variables="[ { \"name\": \"Temp\", \"random\": true, \"max\": 25, \"min\": 23 }, { \"name\": \"Counter\", \"min\": 100 } ]" iottelemetrysimulator/azureiot-telemetrysimulator:latest

What to Check

Verify that the following are valid

4/20/2020 2:32:43 PM> Device: [sim000001], Data:[{ "deviceId": "sim000001", "temp": "23" }]