Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Agent Process Test Fix #398

Merged
merged 1 commit into from Jan 15, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions ion/agents/port/test/test_port_agent_process.py
Expand Up @@ -13,28 +13,35 @@
import unittest import unittest


from nose.plugins.attrib import attr from nose.plugins.attrib import attr

from pyon.public import log
from pyon.public import CFG

# Pyon unittest support.
from pyon.util.int_test import IonIntegrationTestCase

from ion.agents.port.port_agent_process import PortAgentProcess, PythonPortAgentProcess, UnixPortAgentProcess, PortAgentProcessType from ion.agents.port.port_agent_process import PortAgentProcess, PythonPortAgentProcess, UnixPortAgentProcess, PortAgentProcessType
from ion.agents.port.exceptions import PortAgentTimeout from ion.agents.port.exceptions import PortAgentTimeout
from ion.agents.port.exceptions import PortAgentMissingConfig from ion.agents.port.exceptions import PortAgentMissingConfig
from ion.agents.port.exceptions import PortAgentLaunchException from ion.agents.port.exceptions import PortAgentLaunchException
from pyon.public import CFG


# Make tests verbose and provide stdout # Make tests verbose and provide stdout
# bin/nosetests -s -v ion/agents/port/test/test_port_agent_process.py # bin/nosetests -s -v ion/agents/port/test/test_port_agent_process.py


TEST_TIMEOUT = 2 TEST_TIMEOUT = 2
LOCALHOST = 'localhost' LOCALHOST = 'localhost'


DEVICE_ADDR = 'localhost' DEVICE_ADDR = CFG.device.sbe37.host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, thinking more about this: this line (and all these other changes obv) should be of the form:

CFG.get_safe('device.sbe37.host', 'localhost')

That way it's not required to be defined in the config.

DEVICE_PORT = 4001 DEVICE_PORT = CFG.device.sbe37.port


PORT_AGENT_BINARY = 'port_agent' PORT_AGENT_BINARY = 'port_agent'
PORT_AGENT_COMMAND_PORT = 3000 PORT_AGENT_COMMAND_PORT = CFG.device.sbe37.port_agent_cmd_port
PORT_AGENT_DATA_PORT = 3001 PORT_AGENT_DATA_PORT = CFG.device.sbe37.port_agent_data_port
PORT_AGENT_LOG_LEVEL = 5 PORT_AGENT_LOG_LEVEL = 5


@attr('HARDWARE', group='mi') @attr('HARDWARE', group='mi')
class TestPythonEthernetProcess(unittest.TestCase): class TestPythonEthernetProcess(IonIntegrationTestCase):
""" """
Unit tests for the Port Agent Process using python classes Unit tests for the Port Agent Process using python classes
""" """
Expand Down