Reworking runs to include an id, save the run request.

This commit is contained in:
Jonathan Bernard
2017-05-11 10:51:06 -05:00
parent e2c3aeca09
commit 3d8454d486
6 changed files with 75 additions and 20 deletions

View File

@ -1,4 +1,5 @@
import json, strtabs, tables, unittest
import json, strtabs, tables, unittest, uuids
from langutils import sameContents
import ../../../main/nim/strawbosspkg/configuration
@ -18,6 +19,18 @@ suite "load and save configuration objects":
defaultBranch: "deploy",
envVars: newStringTable("VAR1", "value", modeCaseInsensitive))
test "parseRunRequest":
let rr1 = RunRequest(
id: genUUID(),
projectName: testProjDef.name,
stepName: "build",
buildRef: "master",
workspaceDir: "/no-real/dir",
forceRebuild: true)
let rrStr = $rr1
let rr2 = parseRunRequest(parseJson(rrStr))
check rr1 == rr2
test "parseProjectDef":
let pd = parseProjectDef(parseJson(testProjDefStr))