Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
slapos
Commits
7ba6255b
Commit
7ba6255b
authored
May 02, 2018
by
Eteri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove empty lines, remove unnecessary comments, fix local_ip
parent
52cd7d79
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
32 deletions
+15
-32
software/erp5testnode/testsuite/fluentTest/Caddyfile.in
software/erp5testnode/testsuite/fluentTest/Caddyfile.in
+1
-1
software/erp5testnode/testsuite/fluentTest/fluentd-conf.cnf.in
...are/erp5testnode/testsuite/fluentTest/fluentd-conf.cnf.in
+1
-1
software/erp5testnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
...stnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
+3
-11
software/erp5testnode/testsuite/fluentTest/runTestSuite.in
software/erp5testnode/testsuite/fluentTest/runTestSuite.in
+0
-2
software/erp5testnode/testsuite/fluentTest/software.cfg
software/erp5testnode/testsuite/fluentTest/software.cfg
+3
-3
software/erp5testnode/testsuite/fluentTest/testIngestion.py
software/erp5testnode/testsuite/fluentTest/testIngestion.py
+7
-14
No files found.
software/erp5testnode/testsuite/fluentTest/Caddyfile.in
View file @
7ba6255b
{{local_ip}}:4443
proxy /
0.0.0.0
:9443
proxy /
{{local_ip}}
:9443
software/erp5testnode/testsuite/fluentTest/fluentd-conf.cnf.in
View file @
7ba6255b
...
...
@@ -65,7 +65,7 @@
@type debug_agent
@id debug_agent_input
bind
127.0.0.1
bind
{{local_ip}}
port 24230
</source>
...
...
software/erp5testnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
View file @
7ba6255b
...
...
@@ -34,7 +34,6 @@ output = $${directory:bin}/runTestSuite
buildout-directory = $${buildout:directory}
mode = 0700
[runTest-instance]
recipe = slapos.recipe.template
url = ${template-test:output}
...
...
@@ -42,27 +41,24 @@ output = $${directory:bin}/testIngestion.py
buildout-directory = $${buildout:directory}
mode = 0700
#################################
# fluentd service
#################################
[fluentdConfig]
recipe = slapos.recipe.template:jinja2
template = ${template-fluentdConfig:location}/${template-fluentdConfig:filename}
rendered = $${directory:etc}/fluentd-conf.cnf
mode = 0600
context =
context =
key local_ip caddy-configuration:local_ip
[fluentd-service]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/fluentd-service
path = ${fluentd:location}
command-line = ${fluentd:location}/bin/fluentd
-c $${directory:etc}/fluentd-conf.cnf -p ${fluentd-plugin-dev-repository:location}/lib/fluent/plugin/
-c $${directory:etc}/fluentd-conf.cnf -p ${fluentd-plugin-dev-repository:location}/lib/fluent/plugin/
environment =
GEM_PATH= ${fluentd:location}/lib/ruby/gems/1.8/
output = $${:wrapper-path}
...
...
@@ -94,11 +90,7 @@ error_log = $${directory:log}/caddy-error.log
local_ip = $${slap-network-information:local-ipv4}
context =
key local_ip caddy-configuration:local_ip
[publish-connection-information]
recipe = slapos.cookbook:publish
secure_access = http://$${caddy-configuration:local_ip}:4443}
secure_access = http://$${caddy-configuration:local_ip}:4443}
\ No newline at end of file
software/erp5testnode/testsuite/fluentTest/runTestSuite.in
View file @
7ba6255b
...
...
@@ -53,8 +53,6 @@ def main():
test_line_dict = {}
######!!!!!!!!!!!!!! uncomment this !!!!!!!!
# result.errors, result.failures, stream.read()
num_of_tests, errors, failures, stdout = testIngestion.main()
result = testIngestion.main()
...
...
software/erp5testnode/testsuite/fluentTest/software.cfg
View file @
7ba6255b
...
...
@@ -50,7 +50,7 @@ interpreter = pythonwitheggs
[template-fluentdConfig]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/fluentd-conf.cnf.in
#md5sum = 3132b99d65c75b72fc6dacb702ddca0b
md5sum = fd896793455e1d04082449212d285b55
filename = fluentd-conf.cnf.in
location = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
...
...
@@ -79,14 +79,14 @@ mode = 0644
[template-caddyfile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/Caddyfile.in
md5sum =
3132b99d65c75b72fc6dacb702ddca0b
md5sum =
8644e98038ab76a8e5a499e22f92660a
output = ${buildout:directory}/Caddyfile.in
mode = 0644
[template-caddy-fluentd]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-caddy-fluentd.cfg.in
md5sum =
599d4650e9b96ce15fceb512316651ae
md5sum =
4e0c6e0464ad1b2f1adadda10771bb86
output = ${buildout:directory}/instance-caddy-fluentd.cfg.in
mode = 0644
...
...
software/erp5testnode/testsuite/fluentTest/testIngestion.py
View file @
7ba6255b
...
...
@@ -23,8 +23,6 @@ caddy_pidfile = "$${directory:etc}/caddy_pidfile"
posted_data
=
None
all_data
=
[]
request_tag
=
""
with
open
(
caddy_pidfile
)
as
f
:
caddy_pid
=
f
.
readline
()
class
TestServerHandler
(
BaseHTTPRequestHandler
):
...
...
@@ -60,8 +58,6 @@ class TestServerHandler(BaseHTTPRequestHandler):
class
TestPost
(
unittest
.
TestCase
):
posted_data
=
""
def
test_1_get
(
self
):
print
(
"############## TEST 1 ##############"
)
resp
=
requests
.
get
(
url
)
...
...
@@ -90,6 +86,8 @@ class TestPost(unittest.TestCase):
def
test_4_delay_15_mins
(
self
):
print
(
"############## TEST 4 ##############"
)
# sleep 15mins to test that connections doesn't break after long delay
# and data is ingested correctly after the delay.
time
.
sleep
(
900
)
start_fluentd_cat
(
"dummyInputDelay"
,
"tag_test_4"
)
time
.
sleep
(
15
)
...
...
@@ -147,18 +145,13 @@ def start_fluentd_cat(test_msg, tag):
def
kill_caddy
(
caddy_pid
):
print
(
"caddy pid = "
)
print
(
caddy_pid
)
kill_caddy_cmd
=
"kill -TSTP "
+
caddy_pid
os
.
system
(
kill_caddy_cmd
)
print
(
"Caddy is stopped"
)
os
.
system
(
"kill -TSTP %s"
%
caddy_pid
)
print
(
"Caddy is stopped."
)
def
start_caddy
(
caddy_pid
):
start_caddy_cmd
=
"kill -CONT "
+
caddy_pid
os
.
system
(
start_caddy_cmd
)
print
(
"Caddy is restarted"
)
os
.
system
(
"kill -CONT %s"
%
caddy_pid
)
print
(
"Caddy is restarted."
)
def
find_tag
(
s
,
start
,
end
):
return
(
s
.
split
(
start
))[
1
].
split
(
end
)[
0
]
...
...
@@ -166,7 +159,7 @@ def find_tag(s, start, end):
def
main
():
port
=
9443
server_address
=
(
'
0.0.0.0
'
,
port
)
server_address
=
(
'
$${slap-network-information:local-ipv4}
'
,
port
)
httpd
=
HTTPServer
(
server_address
,
TestServerHandler
)
thread
=
threading
.
Thread
(
target
=
httpd
.
serve_forever
)
thread
.
start
()
...
...
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