def test_distribute_test_files_to_cluster_nodes():
        test_cases = [
            {
                'nodes': ['node1', 'node2', 'node3'],
                'expected_result': 5
            },
            {
                'nodes': ['node1', 'node2'],
                'expected_result': 5
            },
            {
                'nodes': ['node1', 'node2', 'node3', 'node4'],
                'expected_result': 5
            },
            {
                'nodes': ['node1', 'node2', 'node3', 'node4', 'node5'],
                'expected_result': 5
            },
            {
                'nodes': ['node1', 'node2', 'node3', 'node5', 'node6'],
                'expected_result': 5
            },
        ]

        for case in test_cases:
            test_data = SstableLoadUtils.get_load_test_data_inventory(
                5, big_sstable=False, load_and_stream=True)
            map_files_to_node = SstableLoadUtils.distribute_test_files_to_cluster_nodes(
                nodes=case["nodes"], test_data=test_data)
            assert len(map_files_to_node) == case["expected_result"], \
                f"Expected {case['expected_result']} elements, got {len(map_files_to_node)}"
 def test_load_and_stream_status(self):
     patterns = [
         SstableLoadUtils.LOAD_AND_STREAM_DONE_EXPR.format(
             'keyspace1', 'standard1'),
         SstableLoadUtils.LOAD_AND_STREAM_RUN_EXPR
     ]
     system_log_follower = self.node.follow_system_log(
         start_from_beginning=True, patterns=patterns)
     SstableLoadUtils.validate_load_and_stream_status(
         self.node, system_log_follower)
    def test_load_column_1_data_inventory():
        test_data = SstableLoadUtils.get_load_test_data_inventory(
            column_number=1, big_sstable=False, load_and_stream=False)
        assert test_data == load_inventory.COLUMN_1_DATA, \
            f"Expected {load_inventory.COLUMN_1_DATA}, got {test_data}"

        test_data = SstableLoadUtils.get_load_test_data_inventory(
            column_number=1, big_sstable=True, load_and_stream=False)
        assert test_data == load_inventory.BIG_SSTABLE_COLUMN_1_DATA, \
            f"Expected {load_inventory.BIG_SSTABLE_COLUMN_1_DATA}, got {test_data}"
 def test_load_load_and_stream_data_inventory():
     test_data = SstableLoadUtils.get_load_test_data_inventory(
         column_number=5, big_sstable=False, load_and_stream=True)
     assert test_data == load_inventory.MULTI_NODE_DATA, \
         f"Expected {load_inventory.MULTI_NODE_DATA}, got {test_data}"
 def test_load_not_supported_data_inventory():
     test_data = SstableLoadUtils.get_load_test_data_inventory(
         column_number=2, big_sstable=False, load_and_stream=False)
     assert not test_data, \
         f"Expected empty test data, got {test_data}"