Commit b9b31683 authored by Magnus Holm Brunbjerg's avatar Magnus Holm Brunbjerg
Browse files

Better test data generation

parent 7b8bda35
......@@ -49,7 +49,7 @@ function generateData (userName, userUsername, userPassword, maxExperiments, max
// Create random start time for issue between experiment start and 5 min from end
const issStartTime = new Date(expStartTime.valueOf() + Math.floor(Math.random() * Math.floor(6900000)))
const issEndTime = new Date(issStartTime.valueOf() + 300000)
const issEndTime = new Date(issStartTime.valueOf() + Math.floor(Math.random() * (Math.floor(600000) - Math.ceil(60000) + 1)) + Math.ceil(60000))
// Get random hardware id from the list for the issue
const hardwareId = hardwareIds[Math.floor(Math.random() * Math.floor(hardwareIds.length - 1))]
......@@ -87,5 +87,7 @@ const hardwareIds = [
'9a9ae959-710a-11e9-9695-d07e350e43bd'
]
generateData('Lars Larsen', 'lars', 'password', 15, 25, 6, hardwareIds)
generateData('Kim Larsen', 'kim', 'password', 15, 25, 6, hardwareIds)
generateData('Lars Larsen', 'lars', 'password', 10, 25, 8, hardwareIds)
generateData('Søren Sørensen', 'søren', 'password', 10, 25, 8, hardwareIds)
generateData('Peter Petersen', 'Peter', 'password', 10, 25, 8, hardwareIds)
generateData('John Johnson', 'john', 'password', 10, 25, 8, hardwareIds)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment