def test_create_single_detailed_forest(self): """ Test the following scenario: The database is given a forest object. It should create a forest with the given name. That forest should match the features of the datailed forest. """ conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password)) hosts = Host.list(conn) db = Database("detailed-forest-create-test-db", hosts[0]) forest = Forest("detailed-forest-create-forest1", host=hosts[0], large_data_directory=ds.large_data_directory) db.set_forest_names([forest.forest_name()]) db.create(conn) forest = Forest.lookup(conn, "detailed-forest-create-forest1") try: self.assertEqual("detailed-forest-create-forest1", forest.forest_name()) self.assertEqual(ds.large_data_directory, forest.large_data_directory()) finally: db.delete(conn)
def test_create_single_detailed_forest(self): """ Test the following scenario: The database is given a forest object. It should create a forest with the given name. That forest should match the features of the datailed forest. """ conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password)) hosts = Host.list_hosts(conn) db = Database("detailed-forest-create-test-db", hosts[0].host_name()) forest = Forest("detailed-forest-create-forest1", host=hosts[0].host_name(), large_data_directory=ds.large_data_directory) db.set_forests([forest]) db.create(conn) forest = Forest.lookup("detailed-forest-create-forest1", conn) try: self.assertEqual("detailed-forest-create-forest1", forest.name()) self.assertEqual(ds.large_data_directory, forest.large_data_directory()) finally: db.remove(conn)
def test_create_forest(self): conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password)) host = Host.list(conn)[0] forest = Forest( "test-forest-simple-create", host=host, large_data_directory=ds.large_data_directory, fast_data_directory=ds.fast_data_directory, ) forest.create(conn) forest = Forest.lookup(conn, "test-forest-simple-create") try: self.assertIsNotNone(forest) self.assertEqual("test-forest-simple-create", forest.forest_name()) self.assertEqual(host.host_name(), forest.host()) self.assertEqual(ds.large_data_directory, forest.large_data_directory()) self.assertEqual(ds.fast_data_directory, forest.fast_data_directory()) finally: forest.remove(conn)
def test_create_single_detailed_forest(self): """ Test the following scenario: The database is given a forest object. It should create a forest with the given name. That forest should match the features of the datailed forest. """ hosts = Host.list(self.connection) db = Database("detailed-forest-create-test-db", hosts[0]) forest = Forest("detailed-forest-create-forest1", host=hosts[0]) forest.set_large_data_directory("") db.set_forest_names([forest.forest_name()]) db.create(self.connection) forest = Forest.lookup(self.connection, "detailed-forest-create-forest1") try: assert "detailed-forest-create-forest1" == forest.forest_name() # this isn't in the properties...oddly. # self.assertEqual(ds.large_data_directory, forest.large_data_directory()) finally: db.delete(connection=self.connection)
def test_create_single_detailed_forest(self): """ Test the following scenario: The database is given a forest object. It should create a forest with the given name. That forest should match the features of the datailed forest. """ hosts = Host.list(self.connection) db = Database("detailed-forest-create-test-db", hosts[0]) forest = Forest("detailed-forest-create-forest1", host=hosts[0]) forest.set_large_data_directory("") db.set_forest_names([forest.forest_name()]) db.create(self.connection) forest = Forest.lookup(self.connection, "detailed-forest-create-forest1") try: assert "detailed-forest-create-forest1" == forest.forest_name() #this isn't in the properties...oddly. #self.assertEqual(ds.large_data_directory, forest.large_data_directory()) finally: db.delete(connection=self.connection)
def test_create_forest(self): conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password)) host = Host.list_hosts(conn)[0] forest = Forest("test-forest-simple-create", host=host.host_name(), large_data_directory=ds.large_data_directory, fast_data_directory=ds.fast_data_directory, ) forest.create(conn) forest = Forest.lookup("test-forest-simple-create", conn) try: self.assertIsNotNone(forest) self.assertEqual("test-forest-simple-create", forest.name()) self.assertEqual(host.host_name(), forest.host()) self.assertEqual(ds.large_data_directory, forest.large_data_directory()) self.assertEqual(ds.fast_data_directory, forest.fast_data_directory()) finally: forest.remove(conn)
def test_create_forest(self): host = Host.list(self.connection)[0] forest = Forest("test-forest-simple-create", host=host) forest.set_large_data_directory("") forest.set_fast_data_directory("") forest.create(self.connection) forest = Forest.lookup(self.connection, "test-forest-simple-create") try: assert forest is not None assert "test-forest-simple-create" == forest.forest_name() assert host == forest.host() assert "" == forest.large_data_directory() assert "" == forest.fast_data_directory() finally: forest.delete(connection=self.connection)
def test_create_forest(self): conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password)) host = Host.list(conn)[0] forest = Forest("test-forest-simple-create", host=host) forest.set_large_data_directory(ds.large_data_directory) forest.set_fast_data_directory(ds.fast_data_directory) forest.create(conn) forest = Forest.lookup(conn, "test-forest-simple-create") try: self.assertIsNotNone(forest) self.assertEqual("test-forest-simple-create", forest.forest_name()) self.assertEqual(host, forest.host()) self.assertEqual(ds.large_data_directory, forest.large_data_directory()) self.assertEqual(ds.fast_data_directory, forest.fast_data_directory()) finally: forest.delete(connection=conn)