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

playbook/ridge: do real test

parent 2d3b5d66
Pipeline #25631 failed with stage
in 0 seconds
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
msg: "{{ fluentbit_pid.stdout }}" msg: "{{ fluentbit_pid.stdout }}"
- name: check state
block:
- name: Wait fluent-bit - name: Wait fluent-bit
ansible.builtin.wait_for: ansible.builtin.wait_for:
timeout: 600 timeout: 600
...@@ -59,6 +61,11 @@ ...@@ -59,6 +61,11 @@
state: absent state: absent
when: fluentbit_pid != "" when: fluentbit_pid != ""
- name: "Build successful, connect to:" - name: print success flag
shell: "true" 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