#NEWLINE# def test_get_node_group( self ) : #NEWLINE# #INDENT# controller = objects . Cluster . get_nodes_by_role ( self . cluster , 'controller' ) [ 0 ] #NEWLINE# compute = objects . Cluster . get_nodes_by_role ( self . cluster , 'compute' ) [ 0 ] #NEWLINE# group_id = self . env . create_node_group ( ) . json_body [ 'id' ] #NEWLINE# compute . group_id = group_id #NEWLINE# self . db . flush ( ) #NEWLINE# self . assertEqual ( group_id , objects . Cluster . get_common_node_group ( self . cluster , [ 'compute' ] ) . id ) #NEWLINE# self . assertEqual ( controller . group_id , objects . Cluster . get_common_node_group ( group_id . cluster , [ 'controller' ] ) . id )