mirror of
https://github.com/openstf/stf
synced 2025-10-03 17:59:28 +02:00
Use a real random model for fake devices.
This commit is contained in:
parent
6acfa5b528
commit
e90df6b2f4
1 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
|||
var util = require('util')
|
||||
|
||||
var uuid = require('node-uuid')
|
||||
var _ = require('lodash')
|
||||
|
||||
var dbapi = require('../db/api')
|
||||
var devices = require('stf-device-db')
|
||||
|
||||
module.exports.generate = function() {
|
||||
var serial = util.format(
|
||||
|
@ -22,7 +24,7 @@ module.exports.generate = function() {
|
|||
platform: 'Android'
|
||||
, manufacturer: 'Foo Electronics'
|
||||
, operator: 'Loss Networks'
|
||||
, model: 'F00'
|
||||
, model: _.sample(Object.keys(devices))
|
||||
, version: '4.1.2'
|
||||
, abi: 'armeabi-v7a'
|
||||
, sdk: 8 + Math.floor(Math.random() * 12)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue