csantanapr closed pull request #3449: Code clean up
URL: https://github.com/apache/incubator-openwhisk/pull/3449
 
 
   

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/ansible/roles/controller/tasks/deploy.yml 
b/ansible/roles/controller/tasks/deploy.yml
index 68d7efa572..a02cf79592 100644
--- a/ansible/roles/controller/tasks/deploy.yml
+++ b/ansible/roles/controller/tasks/deploy.yml
@@ -49,14 +49,14 @@
   when: kafka.protocol == 'SSL'
   copy:
     src: "{{ openwhisk_home }}/ansible/roles/kafka/files/{{ 
kafka.ssl.keystore.name }}"
-    dest: "{{ controller.confdir }}/controller{{ 
groups['controllers'].index(inventory_hostname) }}"
+    dest: "{{ controller.confdir }}/{{ controller_name }}"
 
 - name: copy nginx certificate keystore
   when: controller.protocol == 'https'
   copy:
     src: files/{{ controllerKeystoreName }}
     mode: 0666
-    dest: "{{ controller.confdir }}/controller{{ 
groups['controllers'].index(inventory_hostname) }}"
+    dest: "{{ controller.confdir }}/{{ controller_name }}"
   become: "{{ controller.dir.become }}"
 
 - name: copy certificates
@@ -64,7 +64,7 @@
   copy:
     src: "{{ openwhisk_home }}/ansible/roles/controller/files/{{ item }}"
     mode: 0666
-    dest: "{{ controller.confdir }}/controller{{ 
groups['controllers'].index(inventory_hostname) }}"
+    dest: "{{ controller.confdir }}/{{ controller_name }}"
   with_items:
   - "{{ controller.ssl.cert }}"
   - "{{ controller.ssl.key }}"
@@ -208,10 +208,10 @@
 
 - name: wait until the Controller in this host is up and running
   uri:
-    url: "{{ controller.protocol }}://{{ ansible_host }}:{{ 
controller.basePort + groups['controllers'].index(inventory_hostname) }}/ping"
+    url: "{{ controller.protocol }}://{{ ansible_host }}:{{ 
controller.basePort + (controller_index | int) }}/ping"
     validate_certs: no
-    client_key: "{{ controller.confdir }}/controller{{ 
groups['controllers'].index(inventory_hostname) }}/{{ controller.ssl.key }}"
-    client_cert: "{{ controller.confdir }}/controller{{ 
groups['controllers'].index(inventory_hostname) }}/{{ controller.ssl.cert }}"
+    client_key: "{{ controller.confdir }}/{{ controller_name }}/{{ 
controller.ssl.key }}"
+    client_cert: "{{ controller.confdir }}/{{ controller_name }}/{{ 
controller.ssl.cert }}"
   register: result
   until: result.status == 200
   retries: 12
diff --git a/tests/src/test/scala/common/rest/WskRest.scala 
b/tests/src/test/scala/common/rest/WskRest.scala
index 71ec04a7b1..c2d72b837d 100644
--- a/tests/src/test/scala/common/rest/WskRest.scala
+++ b/tests/src/test/scala/common/rest/WskRest.scala
@@ -1272,7 +1272,7 @@ class RunWskRestCmd() extends FlatSpec with RunWskCmd 
with Matchers with ScalaFu
 
     val entity = body map { b =>
       HttpEntity(ContentTypes.`application/json`, b)
-    } getOrElse HttpEntity(ContentTypes.`application/json`, "")
+    } getOrElse HttpEntity.Empty
 
     val request =
       HttpRequest(
diff --git a/tests/src/test/scala/system/basic/WskRuleTests.scala 
b/tests/src/test/scala/system/basic/WskRuleTests.scala
index c0fc9d020e..a454008789 100644
--- a/tests/src/test/scala/system/basic/WskRuleTests.scala
+++ b/tests/src/test/scala/system/basic/WskRuleTests.scala
@@ -91,7 +91,7 @@ abstract class WskRuleTests extends TestHelpers with 
WskTestHelpers {
     val active = Some("active".toJson)
     val inactive = Some("inactive".toJson)
     val statusPermutations =
-      Seq((triggerName, active), (triggerName, inactive), (triggerName2, 
active), (triggerName2, inactive))
+      Seq((triggerName, active), (triggerName, inactive), (triggerName2, 
active), (triggerName, inactive))
 
     ruleSetup(Seq((ruleName, triggerName, (actionName, actionName, 
defaultAction))), assetHelper)
     assetHelper.withCleaner(wsk.trigger, triggerName2) { (trigger, name) =>
diff --git 
a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala 
b/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
index c6743aadab..048554fa2e 100644
--- a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
+++ b/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
@@ -1,11 +1,12 @@
 /*
- * Copyright 2015-2016 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
diff --git 
a/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala 
b/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala
index 6aea3caf83..351702ea78 100644
--- a/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala
+++ b/tests/src/test/scala/whisk/core/controller/test/ControllerApiTests.scala
@@ -38,7 +38,7 @@ import system.rest.RestUtil
  * Integration tests for Controller routes
  */
 @RunWith(classOf[JUnitRunner])
-class ControllerApiTests extends FlatSpec with RestUtil with Matchers /*with 
ExecHelpers*/ with StreamLogging {
+class ControllerApiTests extends FlatSpec with RestUtil with Matchers with 
StreamLogging {
 
   it should "ensure controller returns info" in {
     val response = RestAssured.given.config(sslconfig).get(getServiceURL)
diff --git 
a/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala 
b/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala
index e2b0eb7d18..1c356bf5a1 100644
--- a/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala
+++ b/tests/src/test/scala/whisk/core/controller/test/WhiskAuthHelpers.scala
@@ -1,11 +1,12 @@
 /*
- * Copyright 2015-2016 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package whisk.core.controller.test
 
 import whisk.core.entity.EntityName


 

----------------------------------------------------------------
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

Reply via email to