-
Notifications
You must be signed in to change notification settings - Fork 0
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
Providing String as a argument causes crash #1
Comments
Playground was outdated. Feel free to reopen the issue if you're experiencing this on local |
Hi @mishushakov , |
Like this?
Keep in mind this is probably not possible to do in YAML, because of double quotes |
I would be interesting in knowing real example how I can pass the object to faker for example, like @HKandulla mentioned, |
Problem is still persistent in playground and on my local machine, it's a real issue with stepci and how faker or liquidless is handled. And I cannot reopen the issue, can we cut the shit? |
I have since added JSON5 support, you can now use single quotes for JSON objects: version: "1.1"
name: Fake Data
tests:
example:
steps:
- name: GET request
http:
url: "https://en.wikipedia.org/wiki/${{color.cmyk | fake: {'format': 'css'}}}"
method: GET
check:
status: /^20/ |
Okay, that seems to work - however when I try to reference phone number format it does not :/ version: "1.1"
name: Fake Data
tests:
example:
steps:
- name: GET request
http:
url: "https://en.wikipedia.org/wiki/${{ phone.number | fake: '+48#########' }}"
method: GET
check:
status: /^20/ At this point I have no clue it's issue with faker (where function works in faker library used in way it should be parsed), liquidless (it seems to pass things correctly) or liquidless-faker (where something on the road is wrong) |
Currently I've found workaround with exposing a endpoint on server that generates a random phone number that is later used in tests, but it would be good to more advanced fake data on the fly |
Hi @mishushakov , thanks for looking into this! Passing not format
Request
Passing format: css
Request
Passing format: css should resolve to: When using liquidless-faker v1.3.2 standalone passing objects as parameters work:
Output:
|
Have you properly re-installed stepci? |
Hi @mishushakov , Example:
Request is:
Request should be:
|
I've tried multiple ways to pipe options to faker but cannot succeeded, when I do things like
{{ lorem.lines | fake: 1 }}
where argument is privitive things ten to work - but only when argument is integer; as soon as I will add string there is a crash.Example:
${{ phone.number | fake: "+48#########" }}
To be checked on https://stepci.com/ playground.
The text was updated successfully, but these errors were encountered: