Exemplo n.º 1
0
def test_reset_real():
    """Perform a reset"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("reset", input_data="y\n")

    testutils.undeploy()

    assert (rtn.return_code == 0)
Exemplo n.º 2
0
def test_no_args():
    """Running del with no args"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop del")

    testutils.undeploy()

    assert (rtn.return_code == 0)
Exemplo n.º 3
0
def test_reset_bail():
    """Attempt a reset but decline"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("reset", input_data="n\n")

    testutils.undeploy()

    assert (rtn.return_code == 255)
Exemplo n.º 4
0
def test_set_a_prop():
    """Set an arbitrary property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop set Info magic AbraKadabra")

    testutils.undeploy()

    assert (rtn.return_code == 0)
Exemplo n.º 5
0
def test_not_subcommand():

    """Call invalid subcommand"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop NON_EXIST")

    testutils.undeploy()

    assert(rtn.return_code == 0)
Exemplo n.º 6
0
def test_test_invalid_prop():

    """Test an invalid property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop test Info magic")

    testutils.undeploy()

    assert(rtn.return_code == 0)
Exemplo n.º 7
0
def test_get_invalid_prop():

    """Get a non-existing property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop get Info magic")

    testutils.undeploy()

    assert(rtn.return_code == 255)
Exemplo n.º 8
0
def test_del_valid_prop():
    """Delete a valid property"""

    config = testutils.get_default_config()
    config.set("Info", "magic", "AbraKadabra")

    testutils.deploy_config(config)

    rtn = testutils.dtf("prop del Info magic")

    testutils.undeploy()

    assert (rtn.return_code == 0)
Exemplo n.º 9
0
def test_no_args():
    """Run with not args"""

    testutils.deploy_config(testutils.get_default_config())

    example_local = "%s/example" % utils.LOCAL_MODULES_DIRECTORY
    utils.touch(example_local)

    rtn = testutils.dtf("local")

    testutils.undeploy()

    assert (rtn.return_code == 0)
Exemplo n.º 10
0
    def test_no_name(self):

        """Attempt create an archive using builtin name"""

        config = testutils.get_default_config()

        version_string = "android-17_XTS"
        zip_name = "%s.zip" % version_string
        config.set("Info", "version-string", version_string)

        self.update_config(config)

        rtn = self.run_cmd("archive create")

        assert(rtn.return_code == 0)
        assert(os.path.isfile(zip_name))

        utils.delete_file(zip_name)