Skip to content

Instantly share code, notes, and snippets.

@imbstack
Last active June 24, 2018 01:39
Show Gist options
  • Save imbstack/174ac9e4d50e1017557b312401ba5bea to your computer and use it in GitHub Desktop.
Save imbstack/174ac9e4d50e1017557b312401ba5bea to your computer and use it in GitHub Desktop.

taskcluster-units.json

{
  "version": 0,
  "title": "Unit Tests",
  "description": "...",
  "units": {
    "set allowed key (twice)": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"},
    "set disallowed key": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"},
    "getting a missing secret is a 404": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"},
    "deleting a missing secret is a 404": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"},
    "reading a missing secret is a 410": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"},
    "something else whatever": {"format": "tap", "taskid": "<task_id>", "artifact": "report.tap"}
  }
}

report.tap

1..5
ok 1 api_test.js (mock) set allowed key (twice)
not ok 2 api_test.js (mock) set disallowed key
  AssertionError [ERR_ASSERTION]: 404 deepEqual 403
      at makeApiCall (test/api_test.js:45:16)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:228:7)
ok 3 api_test.js (real) getting a missing secret is a 404 # SKIP -
ok 4 api_test.js (real) deleting a missing secret is a 404 # SKIP -
ok 5 api_test.js (real) reading an expired secret is a 410 # SKIP -
# tests 5
# pass 4
# fail 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment