Minor fixes
Addressed review comments and included README
Change-Id: Idd3e0cec03eca280a93fff8244f5f885b2322239
diff --git a/compose/docker-compose-ofagent-test.yml b/compose/docker-compose-ofagent-test.yml
index 4632cfc..49e199d 100644
--- a/compose/docker-compose-ofagent-test.yml
+++ b/compose/docker-compose-ofagent-test.yml
@@ -74,7 +74,7 @@
# onos-1
#
onos1:
- image: onosproject/onos:1.8
+ image: cord/onos
container_name: onos1
ports:
- 6633:6653
@@ -90,7 +90,7 @@
# onos-2
#
onos2:
- image: onosproject/onos:1.8
+ image: cord/onos
container_name: onos2
ports:
- 6644:6653
@@ -106,7 +106,7 @@
# onos-3
#
onos3:
- image: onosproject/onos:1.8
+ image: cord/onos
container_name: onos3
ports:
- 6655:6653
@@ -127,4 +127,4 @@
- voltha
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
- restart: unless-stopped
\ No newline at end of file
+ restart: unless-stopped
diff --git a/ofagent/agent.py b/ofagent/agent.py
index 626e105..d2ecd0c 100644
--- a/ofagent/agent.py
+++ b/ofagent/agent.py
@@ -98,8 +98,8 @@
ctx = clientCert.options()
self.connector = reactor.connectSSL(host, port, self, ctx)
- except Exception as error:
- log.error(event, reason=reason)
+ except Exception as e:
+ log.exception('failed-to-connect', reason=e)
self.d_disconnected = Deferred()
diff --git a/tests/utests/README.md b/tests/utests/README.md
new file mode 100644
index 0000000..731ecfa
--- /dev/null
+++ b/tests/utests/README.md
@@ -0,0 +1,27 @@
+## VOLTHA TESTS
+
+There are two set of test cases in Voltha:
+* **Unit Tests**
+ * These tests exercise the smallest testable parts of the code. They
+ are designed to be fully automated and can be executed by a build
+ machine (e.g. Jenkins).
+ * **Integration Tests**
+ * These tests exercise a set of modules when combined together
+
+This document focuses on running the unit tests only.
+
+##### Running the utests
+* **Triggering all the utests as a batch run**: Unit tests under voltha can be run as follows:
+```
+cd /cord/incubator/voltha/
+. ./env.sh
+make utest
+```
+* **OFAgent utests**: A set of unit tests that are executed against the VOLTHA-OFAgent Code base.
+Note that this test needs to run being inside ofagent directory.
+```
+cd /cord/incubator/voltha/
+. ./env.sh
+cd ofagent/
+nosetests -s tests/utests/ofagent/
+```