Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to assign multiple files to a variable #1100

Open
karrybit opened this issue Dec 6, 2024 · 3 comments
Open

[Question] How to assign multiple files to a variable #1100

karrybit opened this issue Dec 6, 2024 · 3 comments

Comments

@karrybit
Copy link

karrybit commented Dec 6, 2024

Is it possible to assign multiple files to a variable by specifying a file path that contains *? I want to combine files other than JSON and YAML, but I couldn't find a way to do that in the documentation, so I'd like to know how.

@k1LoW
Copy link
Owner

k1LoW commented Dec 6, 2024

Hi @karrybit .

Currently, loading files other than JSON ( json:// ) and YAML ( yaml:// ) is not supported.

vars:
  requests: json://path/to/*.json

Only HTTP Runner can POST any files (application/octet-stream or multipart/form-data) , but * is not supported.

What kind of use case do you want to read the files in?

@karrybit
Copy link
Author

karrybit commented Dec 9, 2024

@k1LoW
Hi, Thanks for responding.

Our use case related to this issue involves testing a CLI application that persists CSV data stored in GCS. Using runn, we upload test data from a directory created for testing to the GCS Emulator, then launch the CLI application to verify that the results produce validation errors. Since the test data consists of CSV files, we cannot use the json:// or yaml:// directives for loading. Instead, we need to enumerate all the files in the directory.
To be able to run tests by adding test data, I want to be able to retrieve files from the specified directory.

@k1LoW
Copy link
Owner

k1LoW commented Dec 9, 2024

Using runn, we upload test data from a directory created for testing to the GCS Emulator

To be able to run tests by adding test data, I want to be able to retrieve files from the specified directory.

Do you want to load a list of file paths, not file contents, under a directory?

If possible please show me how to upload files to GCS emurator without runn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants