Commit 245b3e00 authored by Xiaowu Zhang's avatar Xiaowu Zhang

playbook/ridge: do real test

parent 2d3b5d66
...@@ -50,15 +50,22 @@ ...@@ -50,15 +50,22 @@
- name: Print the fluentbit log content to a console - name: Print the fluentbit log content to a console
debug: debug:
msg: "{{ fluentbit_pid.stdout }}" msg: "{{ fluentbit_pid.stdout }}"
- name: Wait fluent-bit
ansible.builtin.wait_for:
timeout: 600
path: /proc/{{fluentbit_pid.stdout}}/status
state: absent
when: fluentbit_pid != ""
- name: "Build successful, connect to:" - name: check state
shell: "true" block:
- name: Wait fluent-bit
ansible.builtin.wait_for:
timeout: 600
path: /proc/{{fluentbit_pid.stdout}}/status
state: absent
when: fluentbit_pid != ""
- name: print success flag
ansible.builtin.debug:
msg: "Build successful, connect to:"
rescue:
- name: print failed flag
ansible.builtin.debug:
msg: "FATAL: all hosts have already failed -- aborting"
import unittest
import os
import json
class TestRidgeState(unittest.TestCase):
def test_task_state(self):
site_status_json = os.environ['TEST_SITE_STATUS_JSON']
with open(site_status_json) as f:
status_dict = json.load(f)
self.assertTrue(status_dict['success'], status_dict)
import unittest
class TestScan(unittest.TestCase):
""" Assert scan happens """
def test_logfile_exist(self):
self.assertTrue(True)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment