feat: add config:clear command

Closes #3537
This commit is contained in:
Jose Diaz-Gonzalez
2019-05-20 13:25:04 -07:00
parent a34d36c5d2
commit f977edabb2
7 changed files with 75 additions and 3 deletions

View File

@@ -80,6 +80,22 @@ func TestConfigSetMany(t *testing.T) {
Expect(SetMany(testAppName+"does_not_exist", vals, false)).ToNot(Succeed())
}
func TestConfigUnsetAll(t *testing.T) {
RegisterTestingT(t)
Expect(setupTestApp()).To(Succeed())
defer teardownTestApp()
expectValue(testAppName, "testKey", "TESTING")
expectValue("", "testKey", "GLOBAL_TESTING")
Expect(UnsetAll(testAppName, false)).To(Succeed())
expectNoValue(testAppName, "testKey")
expectNoValue(testAppName, "noKey")
expectNoValue(testAppName, "globalKey")
Expect(UnsetAll(testAppName+"does-not-exist", false)).ToNot(Succeed())
}
func TestConfigUnsetMany(t *testing.T) {
RegisterTestingT(t)
Expect(setupTestApp()).To(Succeed())