By default, the log-level for console should be info. The relevant
job overrides this to DEBUG, and these set of assertion verify the
desired behaviour, i.e the log-level is set to DEBUG.
Since, it is only possible to have one log mode, console or file,
this patch only tests the 'console' mode.
JIRA: INTPAK-40
Change-Id: I9b0ec79e41c25a4eeeef14f0d89572907b265281
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
--- /dev/null
+---
+
+- hosts: localhost
+ gather_facts: False
+ vars_files:
+ - vars.yaml
+ tasks:
+ - name: get log levels
+ command: /opt/opendaylight/bin/client log:get
+ register: log_levels
+
+ # These tests assume that the log level has already
+ # been set to DEBUG. This is done by over-riding the
+ # required variable while executing the installation
+ # through Jenkins Job
+ - name: assert ROOT log level set to DEBUG
+ assert:
+ that:
+ - "'ROOT │ DEBUG' in log_levels.stdout"
+
+ - name: save the logs
+ command: /opt/opendaylight/bin/client 'log:display -n 10'
+ register: odl_logs
+
+ - name: assert log level is DEBUG
+ assert:
+ that:
+ - "'DEBUG' in odl_logs.stdout"
\ No newline at end of file