Skip to content

Commit

Permalink
secure config test teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronp committed Apr 2, 2019
1 parent 94897eb commit 5674983
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ libraryDependencies ++= List(

publishMavenStyle := true
releaseCrossBuild := true
coverageMinimum := 80
coverageMinimum := 90
coverageFailOnMinimum := true
git.remoteRepo := s"git@github.com:$username/args4c.git"
ghpagesNoJekyll := true
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/args4c/ConfigApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ trait ConfigApp extends LowPriorityArgs4cImplicits {
* @param pathToSecretConfigArgFlag the value for the key in the form <key>=<path to secret password config> (e.g. defaults to "--secret", as in --secret=/etc/passwords.conf)
*/
def runMain(userArgs: Array[String],
secureConfig : SecureConfig,
secureConfig: SecureConfig,
setupUserArgFlag: String = defaultSetupUserArgFlag,
ignoreDefaultSecretConfigArg: String = defaultIgnoreDefaultSecretConfigArg,
pathToSecretConfigArgFlag: String = defaultSecretConfigArgFlag): Option[Result] = {
Expand Down Expand Up @@ -203,7 +203,7 @@ trait ConfigApp extends LowPriorityArgs4cImplicits {
}

protected def secretConfigForArgs(userArgs: Array[String],
secureConfig : SecureConfig,
secureConfig: SecureConfig,
ignoreDefaultSecretConfigArg: String,
pathToSecretConfigArg: String): SecretConfigResult = {

Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/args4c/ConfigAppTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ConfigAppTest extends BaseSpec {
}

override protected def secretConfigForArgs(userArgs: Array[String],
secureConfig : SecureConfig,
secureConfig: SecureConfig,
ignoreDefaultSecretConfigArg: String,
pathToSecretConfigArg: String): SecretConfigResult = {
SecretConfigNotSpecified
Expand Down
4 changes: 3 additions & 1 deletion src/test/scala/args4c/SecureConfigTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ class SecureConfigTest extends BaseSpec {

def deleteConfigFiles() = {
val dir = Paths.get(s"./target/${getClass.getName}")
dir.toFile.listFiles.map(_.toPath).foreach(deleteFile)
require(dir != null, "null dir")
require(dir.toFile != null, "null dir file")
Option(dir.toFile.listFiles).toList.flatten.map(_.toPath).foreach(deleteFile)
}
}

Expand Down

0 comments on commit 5674983

Please sign in to comment.