You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2018/03/19 13:57:18 UTC
[incubator-openwhisk] branch master updated: Code clean up (#3449)
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new dd35df5 Code clean up (#3449)
dd35df5 is described below
commit dd35df55b758c5a1d4a0ce443a4e749356c05410
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Mon Mar 19 09:57:15 2018 -0400
Code clean up (#3449)
---
ansible/roles/controller/tasks/deploy.yml | 12 ++++++------
tests/src/test/scala/common/rest/WskRest.scala | 2 +-
tests/src/test/scala/system/basic/WskRuleTests.scala | 2 +-
.../scala/whisk/core/connector/test/MessageFeedTests.scala | 13 +++++++------
.../whisk/core/controller/test/ControllerApiTests.scala | 2 +-
.../whisk/core/controller/test/WhiskAuthHelpers.scala | 14 ++++++++------
6 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/ansible/roles/controller/tasks/deploy.yml b/ansible/roles/controller/tasks/deploy.yml
index 68d7efa..a02cf79 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 61df948..aaac4ba 100644
--- a/tests/src/test/scala/common/rest/WskRest.scala
+++ b/tests/src/test/scala/common/rest/WskRest.scala
@@ -1273,7 +1273,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 c0fc9d0..a454008 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 c6743aa..048554f 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 6aea3ca..351702e 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 e2b0eb7..1c356bf 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
--
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.