UNPKG

guv

Version:

Grid Utilization Virgilante

104 lines (102 loc) 2.21 kB
# Testcases for config parsing # simple happy - name: 'empty string' input: "" parsed: {} invalid: 'empty' - name: 'only comments' input: "# my comment" parsed: {} valid: true # typical real systems - name: 'imgflo' input: | '*': boot: 20 app: imgflo min: 2 max: 10 processing: { d: 6.0, p: 1.0, queue: 'imgflo_worker.IN' } config: "*": app: imgflo boot: 20.0 processing: deadline: 6.0 processing: 1.0 worker: processing queue: imgflo_worker.IN valid: true - name: 'grid-apis' input: | '*': { boot: 40, app: the-grid-apis } solve: {d: 30.0, p: 5.0} gssmeasure: { deadline: 30.0, p: 5.0 } measure: { d: 60.0, processing: 15.0 } share: {} config: '*': boot: 40.0 app: the-grid-apis solve: deadline: 30.0 processing: 5.0 worker: 'solve' gssmeasure: deadline: 30.0 processing: 5.0 queue: 'gssmeasure' measure: deadline: 60.0 processing: 15.0 share: deadline: 60.0 processing: 10.0 worker: 'share' queue: 'share' valid: true - name: 'unrealistic-deadline' input: | '*': {min: 0, max: 4} failing: { processing: 25, stddev: 12, deadline: 50} invalid: 'is lower than processing time 25' - name: 'missing-space-after:' # is interpreted as key with colon in it, and undefined/null value input: | setqueuerole: { processing: 25, queue:notdefault } invalid: 'unknown property' - name: 'config with typo in property' # should have two ss in processing input: | typorole: { procesing: 25 } invalid: 'unknown property' - name: 'config with unknown property in --allow-key' input: | extrarole: { deadline: 330.33, extrakey: 25 } valid: true validationOptions: '--allow-key extrakey' - name: 'differing role vs worker' input: | '*': boot: 20 app: imgflo min: 2 max: 10 processing: { d: 6.0, p: 1.0, queue: 'imgflo_worker.IN', worker: 'my-process-name' } config: "*": app: imgflo boot: 20.0 processing: deadline: 6.0 processing: 1.0 worker: 'my-process-name' queue: imgflo_worker.IN valid: true