How to find a test file in `FileSystem`

#1

I have a test pickeled ml model file that I want to provision with test data, ie seed. I then want to retrieve the file in my test.

How do I find the file using FileSystem, what path do I provide? The filesystem is looking in s3 when I provide a url, and I want it to find my provisioned file.

Should I be putting the file in the test/seed folder?

0 Likes

#2
  1. The file should be in resource folder
  2. checkout MetadataStore.files
0 Likes

#3

Place your file under <your package>/test/resource/ folder. Then you can access using File S
ystem APIs (meta scheme). E.g. File.make('meta://base/reference/test/resource/test.pkl').read()

1 Like