Open lordrip opened 1 month ago
Hi @shivamG640, I have a proposal for the catalog-generator test:
Extract each of these methods to individual classes, under a dedicated package The method could not receive any parameter, but instead, return an index entry that will be collected by the CatalogGeneratorBuilder class
By doing this, we can assert over the output of each class while also being able to mock them when needed to test the main class.
We should be able to postpone writing the files as a much as possible, up to the generate command.
@mhempleman As you already noticed, we're adding tests for the catalog generator, and as part of this effort, we're thinking of reorganizing a few classes to make them more testable.
We're collecting proposals for this issue, and since you're contributing to the catalog generator, we wanted to give you a heads-up. This won't affect
I don't think it will affect https://github.com/KaotoIO/kaoto/pull/1311, since whatever is decided, it should be implemented on a step-by-step basis.
That being said, if you have a proposal or feedback about what changes would be nice to implement to make the catalog generator more robust and testable, please let us know so we can incorporate your feedback.
Please describe the task that needs to be done
Currently, the catalog generation workflow looks like the following:
index.json
fileThe idea is to generate everything in memory and as the last step, write everything to file. This to be able to run assertions against the output more easily.
Todo
Main
class andGenerateCommandOptions
class (https://github.com/KaotoIO/kaoto/pull/1312)GenerateCommand
classUtil
classCamelCatalogProcessor
class