This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://bugzilla.redhat.com/show_bug.cgi?id=1073725 Test if the env exists before reporting exceeded USER_VARIABLE_MAX_COUNT. If all the env exists, just update them, otherwise report the error
@@ -275,7 +275,10 @@ def user_var_add(variables, gears = []) | |||
FileUtils.mkpath(directory) unless File.directory?(directory) | |||
|
|||
if (Dir.entries(directory).size - 2 + variables.size) > USER_VARIABLE_MAX_COUNT | |||
return 255, "CLIENT_ERROR: User Variables maximum of #{USER_VARIABLE_MAX_COUNT} exceeded\n" | |||
variables.each_pair do |name,value| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can drop value
here, use _
A little busy these days. I will modify later. |
@jwhonce Submitted unit test. |
…into bz1073725
[test][extended:node,cartridge] |
Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/8487/) |
Origin Test Results: FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests/3050/) |
Evaluated for origin up to 4961cb3 |
[merge] |
Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/6153/) |
[merge]again failure in unrelated code |
Evaluated for online up to 4961cb3 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://bugzilla.redhat.com/show_bug.cgi?id=1073725
Test if the env exists before reporting exceeded USER_VARIABLE_MAX_COUNT. If all the env exists, just update them, otherwise report the error