Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.package
Commits
245b3e00
Commit
245b3e00
authored
Dec 20, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ridge: do real test
parent
2d3b5d66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
playbook/roles/ridge/tasks/main.yml
playbook/roles/ridge/tasks/main.yml
+16
-9
playbook/roles/ridge/tests/testRidgeState.py
playbook/roles/ridge/tests/testRidgeState.py
+10
-0
playbook/roles/ridge/tests/testScan.py
playbook/roles/ridge/tests/testScan.py
+0
-6
No files found.
playbook/roles/ridge/tasks/main.yml
View file @
245b3e00
...
...
@@ -50,15 +50,22 @@
-
name
:
Print the fluentbit log content to a console
debug
:
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:"
shell
:
"
true"
-
name
:
check state
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"
playbook/roles/ridge/tests/testRidgeState.py
0 → 100644
View file @
245b3e00
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
)
playbook/roles/ridge/tests/testScan.py
deleted
100644 → 0
View file @
2d3b5d66
import
unittest
class
TestScan
(
unittest
.
TestCase
):
""" Assert scan happens """
def
test_logfile_exist
(
self
):
self
.
assertTrue
(
True
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment