Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

zapier convert: Fix session auth environment variable name #281

Merged
merged 1 commit into from
Mar 23, 2018

Conversation

eliangcs
Copy link
Member

@eliangcs eliangcs commented Mar 23, 2018

Addresses PDE-71.

Fixes two issues:

  • When converting session auth, .env had user-facing auth fields like USERNAME and PASSWORD while it should have SESSION_KEY. (Because zapier test doesn't actually test session auth refreshing.)
  • Use _.snakeCase(key).toUpperCase() instead of key.toUpperCase() to turn an auth field key to the environment variable name, so before the generated test code has this:
authData: {
  sessionKey: process.env.SESSIONKEY
}

Now it becomes:

authData: {
  sessionKey: process.env.SESSION_KEY
}

@eliangcs eliangcs changed the title zapier convert: Fix session auth key zapier convert: Fix session auth environment variable name Mar 23, 2018
Copy link
Contributor

@BrunoBernardino BrunoBernardino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and simple! I didn't pull it down because our test coverage is very good here.

Good job!

Q: Could you link the JIRA card in the number next time? Makes it quicker for me to get there and get the whole context. #recommendation

@eliangcs
Copy link
Member Author

@BrunoBernardino will make sure to do that next time. Thanks for the review and suggestion!

@eliangcs eliangcs merged commit 6874521 into master Mar 23, 2018
@eliangcs eliangcs deleted the convert-session-key branch March 23, 2018 13:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants