Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit bb5a48d

Browse files
authored
Switch translation tests to 'it' as 'es' shows strange results. (#71)
Switch the translation tests to 'it' as the up to now used 'es' now shows the englisch translation 'Hello' instead of the expected 'Hola'. This may get fixed in the future, then we can switch back again.
1 parent 616a233 commit bb5a48d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tests/dat/actions/integration/testWatsonAction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ func main(args: [String:Any]) -> [String:Any] {
66
let username = args["username"] as! String
77
let password = args["password"] as! String
88
let languageTranslator = LanguageTranslator(username: username, password: password, version: "2018-09-16")
9-
let request = TranslateRequest(text: ["Hello"], source: "en", target: "es")
9+
let request = TranslateRequest(text: ["Hello"], source: "en", target: "it")
1010

1111
let failure = { (error: Error) in print(error) }
1212
dispatchGroup.enter()
@@ -17,4 +17,4 @@ func main(args: [String:Any]) -> [String:Any] {
1717
}
1818
_ = dispatchGroup.wait(timeout: .distantFuture)
1919
return resp
20-
}
20+
}

tests/dat/actions/integration/testWatsonActionCodable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Output: Codable {
1313
}
1414
func main(param: Input, completion: @escaping (Output?, Error?) -> Void) -> Void {
1515
let languageTranslator = LanguageTranslator(username: param.username , password: param.password, version: "2018-09-16")
16-
let request = TranslateRequest(text: ["Hello"], source: "en", target: "es")
16+
let request = TranslateRequest(text: ["Hello"], source: "en", target: "it")
1717
let failure = {(error: Error) in
1818
print(" calling translate Error")
1919
print(error)

tests/dat/actions/integration/testWatsonActionCodableSDK1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Output: Codable {
1313
}
1414
func main(param: Input, completion: @escaping (Output?, Error?) -> Void) -> Void {
1515
let languageTranslator = LanguageTranslator(username: param.username , password: param.password, version: "2018-09-16")
16-
languageTranslator.translate(text: ["Hello"], source: "en", target: "es") { (response, error) in
16+
languageTranslator.translate(text: ["Hello"], source: "en", target: "it") { (response, error) in
1717
if let error = error {
1818
print(error)
1919
return

tests/dat/actions/integration/testWatsonActionSDK1.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func main(args: [String:Any]) -> [String:Any] {
88
let languageTranslator = LanguageTranslator(username: username, password: password, version: "2018-09-16")
99

1010

11-
languageTranslator.translate(text: ["Hello"], source: "en", target: "es") { (response, error) in
11+
languageTranslator.translate(text: ["Hello"], source: "en", target: "it" ) { (response, error) in
1212
if let error = error {
1313
print(error)
1414
return
@@ -25,4 +25,4 @@ func main(args: [String:Any]) -> [String:Any] {
2525
_ = _whisk_semaphore.wait(timeout: .distantFuture)
2626
return resp
2727

28-
}
28+
}

tests/src/test/scala/runtime/integration/CredentialsIBMSwiftActionWatsonTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ abstract class CredentialsIBMSwiftActionWatsonTests extends TestHelpers with Wsk
6161
withActivation(wsk.activation, wsk.action.invoke("testWatsonAction")) { activation =>
6262
val response = activation.response
6363
response.result.get.fields.get("error") shouldBe empty
64-
response.result.get.fields("translation") shouldBe JsString("hola")
64+
response.result.get.fields("translation") shouldBe JsString("Ciao")
6565
}
6666

6767
}
@@ -81,7 +81,7 @@ abstract class CredentialsIBMSwiftActionWatsonTests extends TestHelpers with Wsk
8181
withActivation(wsk.activation, wsk.action.invoke("testWatsonActionCodable")) { activation =>
8282
val response = activation.response
8383
response.result.get.fields.get("error") shouldBe empty
84-
response.result.get.fields("translation") shouldBe JsString("hola")
84+
response.result.get.fields("translation") shouldBe JsString("Ciao")
8585
}
8686

8787
}

0 commit comments

Comments
 (0)