2fc586c0d9089876fe40e66bef6d98e03d4c8155,volttrontesting/platform/test_instance_setup.py,,test_zmq_case_web_no_agents,#Any#,158

Before Change




def test_zmq_case_web_no_agents(monkeypatch):
    vhome = create_volttron_home()
    monkeypatch.setenv("VOLTTRON_HOME", vhome)
    config_path = os.path.join(vhome, "config")

    message_bus = "zmq"

After Change




def test_zmq_case_web_no_agents(monkeypatch):
    with create_vcfg_vhome() as vhome:
        monkeypatch.setenv("VOLTTRON_HOME", vhome)
        config_path = os.path.join(vhome, "config")

        message_bus = "zmq"
        vip_address = "tcp://127.0.0.15"
        vip_port = "22916"
        is_web_enabled = "Y"
        web_protocol = "https"
        web_port = "8443"
        gen_web_cert = "Y"
        new_root_ca = "Y"
        ca_country = "US"
        ca_state = "test-state"
        ca_location = "test-location"
        ca_organization = "test-org"
        ca_org_unit = "test-org-unit"
        is_vc = "N"
        is_vcp = "N"
        install_historian = "N"
        install_driver = "N"
        install_listener = "N"

        vcfg_args = "\n".join([message_bus,
                               vip_address,
                               vip_port,
                               is_web_enabled,
                               web_protocol,
                               web_port,
                               gen_web_cert,
                               new_root_ca,
                               ca_country,
                               ca_state,
                               ca_location,
                               ca_organization,
                               ca_org_unit,
                               is_vc,
                               is_vcp,
                               install_historian,
                               install_driver,
                               install_listener
                               ])

        with subprocess.Popen(["vcfg", "--vhome", vhome],
                              env=os.environ,
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              text=True
                              ) as vcfg:
            out, err = vcfg.communicate(vcfg_args)
        // print("CWD is: {}".format(os.getcwd()))
        // print("OUT is: {}".format(out))
        // print("ERROR is: {}".format(err))
        assert os.path.exists(config_path)
        config = ConfigParser()
        config.read(config_path)
        assert config.get("volttron", "message-bus") == "zmq"
        assert config.get("volttron", "vip-address") == "tcp://127.0.0.15:22916"
        assert config.get("volttron", "instance-name") == "volttron1"
        assert config.get("volttron", "bind-web-address") == "{}{}{}".format("https://", get_hostname().lower(), ":8443")
        assert config.get("volttron", "web-ssl-cert") == os.path.join(vhome, "certificates", "certs", "master_web-server.crt")
        assert config.get("volttron", "web-ssl-key") == os.path.join(vhome, "certificates", "private", "master_web-server.pem")
        assert not _is_agent_installed("listener")
        assert not _is_agent_installed("master_driver")
        assert not _is_agent_installed("platform_historian")
        assert not _is_agent_installed("vc ")
        assert not _is_agent_installed("vcp")
        assert not is_volttron_running(vhome)


def test_zmq_case_web_with_agents(monkeypatch):
    with create_vcfg_vhome() as vhome:
        monkeypatch.setenv("VOLTTRON_HOME", vhome)
        config_path = os.path.join(vhome, "config")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_web_no_agents


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_with_agents


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_no_agents


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_web_vc


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_web_vc_with_agents


Project Name: VOLTTRON/volttron
Commit Name: 2fc586c0d9089876fe40e66bef6d98e03d4c8155
Time: 2020-06-19
Author: spencer.gilbride@pnnl.gov
File Name: volttrontesting/platform/test_instance_setup.py
Class Name:
Method Name: test_zmq_case_web_with_agents