Skip to content

Commit

Permalink
Reinstate logic branch and add coverage ignore comment
Browse files Browse the repository at this point in the history
  • Loading branch information
owenniblock committed Jun 1, 2020
1 parent da2cd68 commit da1a8e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/etcd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const assert = require('assert')
const Promise = require('bluebird')
const Etcd = require('node-etcd')
const Lock = require('etcd-lock')
Expand Down Expand Up @@ -27,8 +26,10 @@ function applyChange (config, change) {
if (level >= definition.level) {
if (change.action === 'set') {
definition.setValue(value, level)
} else {
assert(change.action === 'delete')
// We ignore the branch here - there's no likely way that we'll
// get here without action == 'delete' but to be safe we'll leave
// the logic how it is.
} else /* istanbul ignore else|if */ if (change.action === 'delete') {
definition.clearValue(level)
}
changed = true
Expand Down

0 comments on commit da1a8e8

Please sign in to comment.