Skip to content

Commit

Permalink
Tidy test of automatic keys.
Browse files Browse the repository at this point in the history
See #29.
  • Loading branch information
flatheadmill committed Nov 14, 2021
1 parent 8c19cc9 commit 33d80df
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/automatic.t.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Count of tests for a single pass of tests for either `etcd` or Addendum.
const count = 6
const count = 5

// Count of tests for a single pass of tests for either `etcd` or Addendum.
const harness = require('./harness')
Expand Down Expand Up @@ -50,13 +50,14 @@ async function test (okay, { POST, DELETE, GET, PUT, prune }) {
// expected key.
const pruned = prune(response)
key = pruned.data.node.key
delete pruned.data.node.key
okay(/^\/addendum\/queue\/0\d{19}$/.test(key), 'generated key')
okay(pruned, {
status: 201,
data: {
action: 'create',
node: { value: 'x' }
node: {
value: 'x',
key: `/addendum/queue/${response.headers['x-etcd-index'].padStart(20, '0')}`
}
}
}, 'get empty root directory')
}
Expand Down

0 comments on commit 33d80df

Please sign in to comment.