mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-14 11:08:06 +00:00
Timer workers (part 1) (#1863)
Co-authored-by: stas <statis@microsoft.com>
This commit is contained in:
@ -24,6 +24,13 @@ namespace Tests {
|
||||
Arb.Generate<EventCrashReported>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventRegressionReported>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventFileAdded>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventTaskFailed>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventTaskStopped>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventTaskStateUpdated>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventScalesetFailed>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventScalesetResizeScheduled>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventScalesetStateUpdated>().Select(e => e as BaseEvent),
|
||||
Arb.Generate<EventNodeDeleted>().Select(e => e as BaseEvent),
|
||||
});
|
||||
}
|
||||
|
||||
@ -47,6 +54,17 @@ namespace Tests {
|
||||
));
|
||||
}
|
||||
|
||||
public static Gen<NodeTasks> NodeTasks() {
|
||||
return Arb.Generate<Tuple<Guid, Guid, NodeTaskState>>().Select(
|
||||
arg =>
|
||||
new NodeTasks(
|
||||
MachineId: arg.Item1,
|
||||
TaskId: arg.Item2,
|
||||
State: arg.Item3
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static Gen<Node> Node() {
|
||||
return Arb.Generate<Tuple<Tuple<DateTimeOffset?, string, Guid?, Guid, NodeState>, Tuple<Guid?, DateTimeOffset, string, bool, bool, bool>>>().Select(
|
||||
arg => new Node(
|
||||
@ -311,6 +329,10 @@ namespace Tests {
|
||||
return Arb.From(OrmGenerators.BaseEvent());
|
||||
}
|
||||
|
||||
public static Arbitrary<NodeTasks> NodeTasks() {
|
||||
return Arb.From(OrmGenerators.NodeTasks());
|
||||
}
|
||||
|
||||
public static Arbitrary<Node> Node() {
|
||||
return Arb.From(OrmGenerators.Node());
|
||||
}
|
||||
|
Reference in New Issue
Block a user