so testing with kotlin-native and using testcontai...
# kotlin-native
r
so testing with kotlin-native and using testcontainers, does anyone have experience with this? What I basically want to do is run kotlin-code that does changes on the file system (thus, I want it run in a controlled environment) and then assert the state afterwards, e.g. if I change the permissions of a file, I want to check that change afterwards as far as I can see there's no easy step for running testcontainers in native which leads me to believe that I have two strategies available: 1. Find a way to wrap the Go-implementation (after all won't that be some kind of native module?) 2. Write the tests in a supported language, running the kotlin tests one by one, doing the tests in the supported language does anyone have experience with this, recommendations, other strategies, and is it even viable?
d
I'm using Okio - https://github.com/square/okio - on a KMM project to interact with iOS and Android file systems using a common Kotlin interface. Okio includes a FakeFileSystem - https://square.github.io/okio/3.x/okio-fakefilesystem/okio-fakefilesystem/okio.fakefilesystem/-fake-file-system/ - that is useful for test scenarios like you describe. Worth checking out, maybe it's what you're looking for.
r
I will definitely have a look. I suspect it's not what I'm looking for in this case, but I might be pleasantly surprised and otherwise it's always nice to have more tools