How to add test for copying a binary file? #6510
-
|
I am copying some binary files in my recipe from the classpath of the recipe itself. So my recipe jar contains binary files that will be copied to the target project at a certain location. My code reads the "source file" from the classpath using When I run the test I have, I get "The recipe generated source files the test did not expect", listing all the files that the recipe generates. Which is great in itself, but now I don't know how to state that I do expect these binary fiiles? I have looked at Ideally, I want to just state that I expect files to be present at a certain path. Maybe some kind of hash/checksum check of the files would be handy, but not really required for my use case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
hi @wimdeblauwe ; I'd expect that case to be covered through this You should be able to call that with |
Beta Was this translation helpful? Give feedback.
We tend to do
other(Quark) to Remote just fine.https://github.com/openrewrite/rewrite/blob/main/rewrite-gradle%2Fsrc%2Ftest%2Fjava%2Forg%2Fopenrewrite%2Fgradle%2FUpdateGradleWrapperTest.java
I don't think we even use the
Binaryanymore at all. It was an early attempt at how to represent binary files that later was replaced withRemoteinstead.