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

Update cli to fail create/update sequences with limits #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdeuser
Copy link
Contributor

@mdeuser mdeuser commented Jul 6, 2018

fixes #347

@mdeuser mdeuser requested a review from dubee July 6, 2018 01:21
@@ -424,6 +424,11 @@ func parseAction(cmd *cobra.Command, args []string, update bool) (*whisk.Action,
return nil, whisk.MakeWskError(errors.New(errStr), whisk.NOT_ALLOWED, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE)
}

if (Flags.action.sequence && (cmd.LocalFlags().Changed(MEMORY_FLAG) || cmd.LocalFlags().Changed(LOG_SIZE_FLAG) || cmd.LocalFlags().Changed(TIMEOUT_FLAG))) {
errStr := wski18n.T("A sequence cannot have a memory limit, a log size limit or a timeout limit.")
Copy link
Member

Choose a reason for hiding this comment

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

Can we transition to using message identifiers instead as in https://github.com/apache/incubator-openwhisk-cli/blob/master/commands/messages.go#L26.

@@ -173,6 +173,48 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
expectedExitCode = MISUSE_EXIT)
}

it should "reject create or update of an action sequence that sets a memory limit" in withAssetCleaner(wskprops) { (wp, assetHelper) =>
Copy link
Member

Choose a reason for hiding this comment

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

all of these might be better suited as go unit tests - i think it makes sense to start adding new tests that are strictly testing the CLI in go.

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

Successfully merging this pull request may close these issues.

When creating/updating a sequence, do not permit limits
2 participants