csantanapr closed pull request #195: update commons-io to 2.6
URL: https://github.com/apache/incubator-openwhisk-cli/pull/195
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/tests/src/test/scala/system/basic/WskSdkTests.scala
b/tests/src/test/scala/system/basic/WskSdkTests.scala
index b36c823d..87fe1f67 100644
--- a/tests/src/test/scala/system/basic/WskSdkTests.scala
+++ b/tests/src/test/scala/system/basic/WskSdkTests.scala
@@ -30,6 +30,7 @@ import common.TestUtils.SUCCESS_EXIT
import common.Wsk
import common.WskProps
import common.WskTestHelpers
+import java.nio.charset.StandardCharsets
@RunWith(classOf[JUnitRunner])
class WskSdkTests extends TestHelpers with WskTestHelpers {
@@ -71,7 +72,7 @@ class WskSdkTests extends TestHelpers with WskTestHelpers {
val dockerfile = new File(sdk, "Dockerfile")
dockerfile.exists() should be(true)
dockerfile.isFile() should be(true)
- val lines = FileUtils.readLines(dockerfile)
+ val lines = FileUtils.readLines(dockerfile, StandardCharsets.UTF_8)
// confirm that the image is correct
lines.get(1) shouldBe "FROM openwhisk/dockerskeleton"
@@ -108,7 +109,7 @@ class WskSdkTests extends TestHelpers with WskTestHelpers {
try {
val stdout = wsk.cli(Seq("sdk", "install", "bashauto"), workingDir =
dir, expectedExitCode = SUCCESS_EXIT).stdout
stdout should include("is installed in the current directory")
- val fileContent = FileUtils.readFileToString(scriptfile)
+ val fileContent = FileUtils.readFileToString(scriptfile,
StandardCharsets.UTF_8)
fileContent should include("bash completion for wsk")
} finally {
scriptfile.delete()
diff --git a/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
b/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
index 220953ba..f69ddd05 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
@@ -31,6 +31,7 @@ import common.TestUtils._
import common.Wsk
import common.WskProps
import common.WskTestHelpers
+import java.nio.charset.StandardCharsets
@RunWith(classOf[JUnitRunner])
class WskConfigTests extends TestHelpers with WskTestHelpers {
@@ -356,7 +357,7 @@ class WskConfigTests extends TestHelpers with
WskTestHelpers {
val rr = wsk.cli(Seq("property", "set", "--apihost", apihost), env
= env)
rr.stdout.trim shouldBe s"ok: whisk API host set to $apihost"
rr.stderr shouldBe 'empty
- val fileContent = FileUtils.readFileToString(tmpwskprops)
+ val fileContent = FileUtils.readFileToString(tmpwskprops,
StandardCharsets.UTF_8)
fileContent should include(s"APIHOST=$apihost")
}
}
@@ -371,7 +372,7 @@ class WskConfigTests extends TestHelpers with
WskTestHelpers {
val env = Map("WSK_CONFIG_FILE" -> tmpwskprops.getAbsolutePath())
wsk.cli(Seq("property", "set", "--auth", "testKey"), env = env)
try {
- val fileContent = FileUtils.readFileToString(tmpwskprops)
+ val fileContent = FileUtils.readFileToString(tmpwskprops,
StandardCharsets.UTF_8)
fileContent should include("AUTH=testKey")
} finally {
tmpwskprops.delete()
@@ -404,7 +405,7 @@ class WskConfigTests extends TestHelpers with
WskTestHelpers {
stdout should include regex ("ok: client key set")
stdout should include regex ("ok: whisk API host set")
stdout should include regex ("ok: whisk API version set")
- val fileContent = FileUtils.readFileToString(tmpwskprops)
+ val fileContent = FileUtils.readFileToString(tmpwskprops,
StandardCharsets.UTF_8)
fileContent should include("AUTH=testKey")
fileContent should include("APIHOST=openwhisk.ng.bluemix.net")
fileContent should include("APIVERSION=v1")
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services