-
Notifications
You must be signed in to change notification settings - Fork 50
convert authorization fail #80
Comments
I have similar results:
No sure how to overcome this. |
@XuCcc Did you found a way to overcome the auth method? |
i just overwrite them by sublime with alt+d 😶 |
Would you mind giving some more context? I'm not sure I even understand what these lines are supposed to do? config.options.x -
auth -
token = "...."; and config.headers.X - ApiKey = true; |
PostMan origin json: {
"name": "安全规范遵从度汇总数据",
"request": {
"method": "GET",
"header": [
{
"key": "x-auth-token",
"value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "text"
}
],
"url": {
"raw": "{{address}}/interface/v3/products/{{pbi}}/compliance",
"host": [
"{{address}}"
],
"path": [
"interface",
"v3",
"products",
"{{pbi}}",
"compliance"
],
"query": [
{
"key": "pbi",
"value": "4120335",
"disabled": true
}
]
}
},
"response": []
}, when convert to k6 postman[Request]({
name: "安全规范遵从度汇总数据",
id: "a127b32a-1ea0-46ad-a28f-56ad27b7309e",
method: "GET",
address: "{{address}}/interface/v3/products/{{pbi}}/compliance",
headers: {
"x-auth-token":
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
auth(config, Var) {
config.options.x -
auth -
token = "xxxxxxxxxxxxxxxxxxxx";
}
}); this js code has syntax error when i run k6 with it ❯ k6 run .\a.js
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
ERRO[0000] SyntaxError: file:///C:/Users/x00519684/Desktop/a.js: Invalid left-hand side in assignment expression (32:8)
30 | },
31 | auth(config, Var) {
> 32 | config.options.x -
| ^
33 | auth -
34 | token = "xxxxxxxxxxxx";
35 | } at <eval>:2:28542(114) |
Yeah, this definitely looks to be generating borked code in this particular case. I’ll have a look and get back to you. |
Apologies for the inactivity on this project. Due to the inability to properly support this project, the k6 team has decided not to continue its development. The primary reason is that k6 scope has grown significantly with the launch of k6 extensions. The team is prioritizing extending k6 capabilities over the converters. We suggest you post your issue at api-deck/postman-to-k6. The project is active and maintained on this fork. |
i find that some authorization convert fail, like
The text was updated successfully, but these errors were encountered: