Documentation ¶
Index ¶
- Constants
- type Config
- type Runner
- func (r *Runner) RunSimulation(ctx context.Context, sim Simulation) error
- func (r *Runner) RunTests(ctx context.Context) error
- func (r *Runner) SendBogusAuth(ctx context.Context, bearerToken string) error
- func (r *Runner) SendCorruptedMetric(ctx context.Context) error
- func (r *Runner) SendEmptyMetric(ctx context.Context) error
- func (r *Runner) SendOK(ctx context.Context) error
- type Simulation
Constants ¶
View Source
const ( // ValidTestAccountID is a valid test account that should be recognized // by the system ValidTestAccountID = "testacct-0000-0000-0000-000000000000" // ValidTestUserID is a valid test user id that should be recognized by the system ValidTestUserID = "testuser-0000-0000-0000-000000000000" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
Runner is Fake IOT device runner
func (*Runner) RunSimulation ¶
func (r *Runner) RunSimulation(ctx context.Context, sim Simulation) error
RunSimulation runs test simulation
func (*Runner) RunTests ¶
RunTests runs a series of compliance tests to make sure that server performs as expected
func (*Runner) SendBogusAuth ¶
SendBogusAuth sends a request with bogus authentication and expects to fail
func (*Runner) SendCorruptedMetric ¶
SendCorruptedMetric sends corrupted metric
func (*Runner) SendEmptyMetric ¶
SendEmptyMetric sends empty metric and expects an error
type Simulation ¶
type Simulation struct { // Period is a period to run simulation for Period time.Duration // Freq is a frequency of activity Freq time.Duration // AccountID is an account ID to emit AccountID string // Users is a total amount of different users to simulate accross // all accounts. Simulation will generate distinct user IDs // and emit them in a rotating loop Users int }
Simulation is a IOT device simulation
Click to show internal directories.
Click to hide internal directories.