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
430515ea
Commit
430515ea
authored
May 04, 2018
by
Eteri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add local-ipv4
parent
829360b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
24 deletions
+40
-24
software/erp5testnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
...stnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
+5
-1
software/erp5testnode/testsuite/fluentTest/software.cfg
software/erp5testnode/testsuite/fluentTest/software.cfg
+2
-5
software/erp5testnode/testsuite/fluentTest/tests/test.py
software/erp5testnode/testsuite/fluentTest/tests/test.py
+31
-16
software/erp5testnode/testsuite/fluentTest/tests/utils.py
software/erp5testnode/testsuite/fluentTest/tests/utils.py
+2
-2
No files found.
software/erp5testnode/testsuite/fluentTest/instance-caddy-fluentd.cfg.in
View file @
430515ea
...
@@ -109,4 +109,8 @@ command-line =
...
@@ -109,4 +109,8 @@ command-line =
${buildout:bin-directory}/runTestSuite
${buildout:bin-directory}/runTestSuite
--python_interpreter=${buildout:bin-directory}/${eggs:interpreter}
--python_interpreter=${buildout:bin-directory}/${eggs:interpreter}
--source_code_path_list=$${slapos:location}/software/erp5testnode/testsuite/fluentTest/tests/
--source_code_path_list=$${slapos:location}/software/erp5testnode/testsuite/fluentTest/tests/
####################################################
\ No newline at end of file
environment =
PATH=${buildout:bin-directory}:/usr/bin/:/bin/
LOCAL_IPV4=$${slap-network-information:local-ipv4}
GLOBAL_IPV6=$${slap-network-information:global-ipv6}
\ No newline at end of file
software/erp5testnode/testsuite/fluentTest/software.cfg
View file @
430515ea
...
@@ -16,8 +16,6 @@ parts =
...
@@ -16,8 +16,6 @@ parts =
instance-profile
instance-profile
template-fluentdConfig
template-fluentdConfig
[setup-develop-egg]
[setup-develop-egg]
recipe = zc.recipe.egg:develop
recipe = zc.recipe.egg:develop
...
@@ -32,7 +30,6 @@ setup = ${slapos-repository:location}/software/erp5testnode/testsuite/fluentTest
...
@@ -32,7 +30,6 @@ setup = ${slapos-repository:location}/software/erp5testnode/testsuite/fluentTest
egg = erp5.util[testnode]
egg = erp5.util[testnode]
setup = ${erp5.util-repository:location}
setup = ${erp5.util-repository:location}
[eggs]
[eggs]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs =
eggs =
...
@@ -98,7 +95,7 @@ mode = 0644
...
@@ -98,7 +95,7 @@ mode = 0644
[template-fluentdConfig]
[template-fluentdConfig]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/fluentd-conf.cnf.in
url = ${:_profile_base_location_}/templates/fluentd-conf.cnf.in
md5sum = fd896793455e1d04082449212d285b55
#md5sum = 63b8bea7fcc18af68e8bdf2afc33a92d
filename = fluentd-conf.cnf.in
filename = fluentd-conf.cnf.in
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
mode = 0644
...
@@ -134,7 +131,7 @@ mode = 0644
...
@@ -134,7 +131,7 @@ mode = 0644
[template-caddy-fluentd]
[template-caddy-fluentd]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-caddy-fluentd.cfg.in
url = ${:_profile_base_location_}/instance-caddy-fluentd.cfg.in
md5sum = ac6f4d735716c1a4e5226f1dfad2966d
#md5sum = 0faafb57e55c6e1a310433c11e781133
output = ${buildout:directory}/instance-caddy-fluentd.cfg.in
output = ${buildout:directory}/instance-caddy-fluentd.cfg.in
mode = 0644
mode = 0644
...
...
software/erp5testnode/testsuite/fluentTest/tests/test.py
View file @
430515ea
...
@@ -11,13 +11,14 @@ import SocketServer
...
@@ -11,13 +11,14 @@ import SocketServer
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
import
os
import
os
import
threading
import
time
import
time
import
utils
import
utils
import
multiprocessing
test_msg
=
"dummyInputSimpleIngest"
test_msg
=
"dummyInputSimpleIngest"
url
=
"http://$${caddy-configuration:local_ip}:8443"
#url = "http://$${caddy-configuration:local_ip}:8443"
url
=
"http://10.0.46.242:8443"
caddy_pidfile
=
"$${directory:etc}/caddy_pidfile"
caddy_pidfile
=
"$${directory:etc}/caddy_pidfile"
...
@@ -68,23 +69,37 @@ class TestServerHandler(BaseHTTPRequestHandler):
...
@@ -68,23 +69,37 @@ class TestServerHandler(BaseHTTPRequestHandler):
class
TestIngestion
(
FluentdPluginTestCase
):
class
TestIngestion
(
FluentdPluginTestCase
):
def
setUp
(
self
):
@
classmethod
def
startServer
(
cls
):
port
=
9443
port
=
9443
server_address
=
(
'$${slap-network-information:local-ipv4}'
,
port
)
#server_address = ('$${slap-network-information:local-ipv4}', port)
httpd
=
HTTPServer
(
server_address
,
TestServerHandler
)
server_address
=
(
'0.0.0.0'
,
port
)
thread
=
threading
.
Thread
(
target
=
httpd
.
serve_forever
)
#ip = os.environ.get('LOCAL_IPV4', '127.0.1.1')
thread
.
start
()
server
=
HTTPServer
(
server_address
,
TestServerHandler
)
print
'Starting http...'
cls
.
server_process
=
multiprocessing
.
Process
(
target
=
server
.
serve_forever
)
time
.
sleep
(
15
)
cls
.
server_process
.
start
()
@
classmethod
def
stopServer
(
cls
):
cls
.
server_process
.
terminate
()
def
setUp
(
self
):
self
.
startServer
()
# port=9443
# server_address = ('$${slap-network-information:local-ipv4}', port)
# httpd = HTTPServer(server_address, TestServerHandler)
# thread = threading.Thread(target=httpd.serve_forever)
# thread.start()
# print 'Starting http...'
# time.sleep(15)
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
stopServer
()
httpd
.
shutdown
()
time
.
sleep
(
10
)
print
(
"all posted data : "
)
# httpd.shutdown()
print
(
all_data
)
# print("all posted data : ")
# print(all_data)
def
test_1_get
(
self
):
def
test_1_get
(
self
):
print
(
"############## TEST 1 ##############"
)
print
(
"############## TEST 1 ##############"
)
resp
=
requests
.
get
(
url
)
resp
=
requests
.
get
(
url
)
...
...
software/erp5testnode/testsuite/fluentTest/tests/utils.py
View file @
430515ea
...
@@ -95,8 +95,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
...
@@ -95,8 +95,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
# Some tests are expecting that local IP is not set to 127.0.0.1
# Some tests are expecting that local IP is not set to 127.0.0.1
ipv4_address
=
os
.
environ
.
get
(
'LOCAL_IPV4'
,
'127.0.1.1'
)
ipv4_address
=
os
.
environ
.
get
(
'LOCAL_IPV4'
,
'127.0.1.1'
)
#
ipv6_address = os.environ['GLOBAL_IPV6']
ipv6_address
=
os
.
environ
[
'GLOBAL_IPV6'
]
ipv6_address
=
''
#
ipv6_address = ''
config
[
'proxy_host'
]
=
config
[
'ipv4_address'
]
=
ipv4_address
config
[
'proxy_host'
]
=
config
[
'ipv4_address'
]
=
ipv4_address
config
[
'ipv6_address'
]
=
ipv6_address
config
[
'ipv6_address'
]
=
ipv6_address
...
...
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