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

The test-ui helper does not support nil PromptOptions for fake Prompt #212

Open
rboykin opened this issue Jun 4, 2020 · 0 comments
Open

Comments

@rboykin
Copy link

rboykin commented Jun 4, 2020

The test-ui helper assumes the PromptOptions parameter on Prompt is always non-null: https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/testhelpers/terminal/test_ui.go#L61

This is inconsistent with the way the actual runtime works since the Prompt type has a default embedded PromptOptions field initialized to default values https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/bluemix/terminal/prompt.go#L42 and then NewPrompt optionally overrides this default: https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/bluemix/terminal/prompt.go#L56

As a result, if you want to do ginkgo tests using the fake UI Prompt, you are required to provide a PromptOptions parameter on your runtime code.

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

1 participant