Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into postgresql-level…
Browse files Browse the repository at this point in the history
…-one-integ-tests
  • Loading branch information
bonicim committed Jul 20, 2020
2 parents 0767c38 + 92bf694 commit 68dbb45
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/rabbit_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ function install_on_debian {
${prefix} apt-get install apt-transport-https libwxbase3.0-0v5 libwxgtk3.0-0v5 libsctp1 build-essential python-dev openssl libssl-dev libevent-dev git
${prefix} apt-get purge -yf erlang*
# Add the signing key
wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -
wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | ${prefix} apt-key add -

if [[ ! -f "/etc/apt/sources.list.d/erlang.solutions.list" ]]; then
echo "deb https://packages.erlang-solutions.com/ubuntu $DIST contrib" | sudo tee /etc/apt/sources.list.d/erlang.solutions.list
echo "deb https://packages.erlang-solutions.com/ubuntu $DIST contrib" | ${prefix} tee /etc/apt/sources.list.d/erlang.solutions.list
fi

version=${erlang_package_version}
Expand Down
22 changes: 16 additions & 6 deletions volttrontesting/testutils/test_platformwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,30 @@
# p.join()


@pytest.mark.parametrize("messagebus, ssl_auth", [('rmq', True)]) # , ('rmq', False), ('zmq', False)] )
@pytest.mark.parametrize("messagebus, ssl_auth", [
('zmq', False)
# , ('zmq', False)
# , ('rmq', True)
])
def test_can_create(messagebus, ssl_auth):

p = PlatformWrapper(messagebus=messagebus, ssl_auth=ssl_auth)
assert not p.is_running()
assert p.volttron_home.startswith("/tmp/tmp")
try:
assert not p.is_running()
assert p.volttron_home.startswith("/tmp/tmp")

p.startup_platform(vip_address=get_rand_tcp_address())
assert p.is_running()
finally:
if p:
p.shutdown_platform()

p.startup_platform(vip_address=get_rand_tcp_address())
assert p.is_running()
p.shutdown_platform()
assert not p.is_running()





@pytest.mark.wrapper
def test_volttron_config_created(volttron_instance):
config_file = os.path.join(volttron_instance.volttron_home, "config")
Expand Down
4 changes: 4 additions & 0 deletions volttrontesting/utils/platformwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ def build_agent(self, address=None, should_spawn=True, identity=None,
self.logit("BUILD agent VOLTTRON HOME: {}".format(self.volttron_home))
if self.bind_web_address:
kwargs['enable_web'] = True

if 'enable_store' not in kwargs:
kwargs['enable_store'] = False
agent = agent_class(address=address, identity=identity,
publickey=publickey, secretkey=secretkey,
serverkey=serverkey,
Expand Down Expand Up @@ -716,6 +719,7 @@ def startup_platform(self, vip_address, auth_dict=None,

# Use dynamic_agent so we can look and see the agent with peerlist.
if not setupmode:
gevent.sleep(2)
self.dynamic_agent = self.build_agent(identity="dynamic_agent")
assert self.dynamic_agent is not None
assert isinstance(self.dynamic_agent, Agent)
Expand Down

0 comments on commit 68dbb45

Please sign in to comment.