Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
34d182ec
Commit
34d182ec
authored
Feb 23, 2011
by
Michal 'vorner' Vaner
Browse files
[trac565] Naming and wording fixes
parent
f9e5f363
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/bind10/bind10.py.in
View file @
34d182ec
...
...
@@ -229,7 +229,7 @@ class BoB:
self.verbose = verbose
def config_handler(self, new_config):
#
T
his is initial update, don't do anything
by it
, leave it to startup
#
If t
his is initial update, don't do anything
now
, leave it to startup
if not self.runnable:
return
if self.verbose:
...
...
@@ -605,7 +605,7 @@ class BoB:
def stop_process(self, process, sendto):
"""
Stop the given process, friendly-like. The process is the name it has
(in logs, etc), the se
cond
is the address on msgq.
(in logs, etc), the se
nto
is the address on msgq.
"""
if self.verbose:
sys.stdout.write("[bind10] Asking %s to terminate\n" % process)
...
...
src/bin/bind10/tests/bind10_test.py
View file @
34d182ec
...
...
@@ -142,13 +142,13 @@ class TestBoB(unittest.TestCase):
self
.
assertEqual
(
bob
.
cfg_start_auth
,
True
)
self
.
assertEqual
(
bob
.
cfg_start_resolver
,
False
)
# Class for testing the Bo
b.
start
_all_processes() method call
.
# Class for testing the Bo
B
start
/stop components routines
.
#
# Although testing that external processes start is outside the scope
# of the unit test, by overriding the process start methods we can check
# that the right processes are started depending on the configuration
# options.
class
Start
AllProcesses
Bob
(
BoB
):
class
Start
Check
Bob
(
BoB
):
def
__init__
(
self
):
BoB
.
__init__
(
self
)
...
...
@@ -199,6 +199,9 @@ class StartAllProcessesBob(BoB):
def
start_cmdctl
(
self
,
c_channel_env
):
self
.
cmdctl
=
True
# We don't really use all of these stop_ methods. But it might turn out
# someone would add some stop_ method to BoB and we want that one overriden
# in case he forgets to update the tests.
def
stop_msgq
(
self
):
self
.
msgq
=
False
...
...
@@ -285,8 +288,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
# Checks the processes started when starting neither auth nor resolver
# is specified.
def
test_start_none
(
self
):
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes and check what was started
...
...
@@ -298,8 +301,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
# Checks the processes started when starting only the auth process
def
test_start_auth
(
self
):
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes and check what was started
...
...
@@ -312,8 +315,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
# Checks the processes started when starting only the resolver process
def
test_start_resolver
(
self
):
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes and check what was started
...
...
@@ -326,8 +329,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
# Checks the processes started when starting both auth and resolver process
def
test_start_both
(
self
):
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes and check what was started
...
...
@@ -344,8 +347,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
to configuration changes.
"""
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes (nothing much should be started, as in
...
...
@@ -409,8 +412,8 @@ class TestStartStopProcessesBob(unittest.TestCase):
"""
Tests that a process is started only once.
"""
# Create
d
Bo
b
and ensure initialization
correct
bob
=
Start
AllProcesses
Bob
()
# Create Bo
B
and ensure
correct
initialization
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
# Start processes (both)
...
...
@@ -436,7 +439,7 @@ class TestStartStopProcessesBob(unittest.TestCase):
Test that processes are not started by the config handler before
startup.
"""
bob
=
Start
AllProcesses
Bob
()
bob
=
Start
Check
Bob
()
self
.
check_preconditions
(
bob
)
bob
.
start_auth
=
lambda
:
self
.
fail
(
"Started auth again"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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