Skip to content

Commit 53e4e4c

Browse files
committed
Fix unit tests, remove unused code
1 parent 51c6f8b commit 53e4e4c

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

hpcframework_unittest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_mock_mesos_offer(cpus, max_cores, is_windows, hostname):
5656

5757
class HpcFrameworkUnitTest(unittest.TestCase):
5858
def setUp(self):
59-
self.hpcpackFramework = hpcframework.HpcpackFramwork("", "", "", "", "", "", "")
59+
self.hpcpackFramework = hpcframework.HpcpackFramwork("", "", "", "", "", "", 0, "")
6060

6161
@patch('hpcframework.HpcpackFramwork.decline_offer')
6262
@patch('hpcframework.HpcpackFramwork.accept_offer')

restclient.py

-15
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,3 @@ def add_node_to_node_group(self, group_name, node_names):
155155
res = self._post(self.add_node_to_node_group.__name__, self.ADD_NODES_TO_NODE_GROUP_ROUTE.format(
156156
group_name=group_name), json.dumps(node_names))
157157
return _return_json_from_res(res)
158-
159-
160-
if __name__ == '__main__':
161-
client = HpcRestClient(r"E:\Certs\testhpcfull.pem")
162-
ans = client.get_grow_decision()
163-
print ans.cores_to_grow
164-
print client.check_nodes_idle(['mesoswinjd'])
165-
166-
print client.list_node_groups("MESOS")
167-
print client.add_node_group("Mesos", "Node Group for Compute nodes from Mesos")
168-
print client.add_node_to_node_group("mesos", ["mesoswinjd"])
169-
# print client.bring_nodes_online(['mesoswinjd'])
170-
# print client.assign_nodes_template(['iaascn000'], client.DEFAULT_COMPUTENODE_TEMPLATE)
171-
172-
print client.get_node_status_exact(["mesoswinjd"])

0 commit comments

Comments
 (0)