-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to access files outside of archive #3739
Comments
Hi @eloo-abi,
Unfortunately, this is not how it is expected to work. The archive feature allows the script to be sharable which means all the resources needed for running the test have to be in the archive. k6 resolves and stores the files in the archive when The steps reported in the |
Hi @codebien Ah yes for sure i have missed a step.. or better said a detail.
yes i totally agree with that. because in our scenario we want to share the code for our tests between our stages. but for sure we don't want to share our secrets and configurations between our environments. so our idea was we have the secrets and configurations provided by our environments and then share the test code between stages maybe this could be improved in future to be more flexible here thanks edit: |
@eloo-abi |
sounds to me like i do NOT get system envs into my current run. i build the tarball on a CI system (decoupled from our applications) with a default test config so exclude env vars is not what helps me here
we have plenty of data here.. |
Brief summary
Hi,
we are trying to use k6 in a kubernetes environment together with the k6-operator (not sure if its a k6 or operator issue)
Therefore we want to mount our test configurations as configmap into the runner pods and then load it at runtime like this
but as we are bundling our tests as k6 archive it looks like we are running into a bug that we are not able to load file from the filesystem.
k6 is complaining that the file is not existing as long as it is not bundled into the tarball under "file"
At least i can not found anything in the docs for such a limitation so i think its some kind of bug that the filesystem is not reachable.
Best regards
k6 version
0.50.0
OS
kubernetes
Docker version and image (if applicable)
No response
Steps to reproduce the problem
/tmp/test-config.json
./test-config.json
k6 archive --env CONFIG_FILES_DIRECTORY=.
k6 run my-test.tar --env CONFIG_FILES_DIRECTORY=/tmp
Expected behaviour
i can access the filesystem in the same way as without a k6 archive
Actual behaviour
looks like the k6 archive has a different way to load files as plain script executions
The text was updated successfully, but these errors were encountered: