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

DISCUSSION: Function test params #555

Open
alwillia opened this issue Sep 27, 2019 · 0 comments
Open

DISCUSSION: Function test params #555

alwillia opened this issue Sep 27, 2019 · 0 comments
Assignees

Comments

@alwillia
Copy link
Member

We may want to add a way in the function test area to also specify function mount parameters. The test area is rightly focused on testing input parameters from the sheets, but it's also important to be able to develop and test with mount parameters, and right now, the only way to specify these is by defining the yaml mount interface outside the package, then refreshing the connection.

For example: if I'm developing a function pack that uses an api key, I want to add the code in the function that gets the api key from the function mount; it looks like this:

    # get the api key from the variable input
    auth_token = dict(flex.vars).get("service_api_key")
    if auth_token is None:
        flex.output.content_type = "application/json"
        flex.output.write([[""]])
        return

However, to test this, I need an easy way to specify the service-api variable, and the only way to do this is through the mount form or an api call outside flex.

I think it's important whatever is added to not interfere with the streamlined approach right now; this may be suited to the advanced area where we allow the user to specify config inputs as well as the normal function param inputs.

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

3 participants