-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bug: environment resource configuration field is affected by global s… #326
Conversation
Couple of questions:
|
We talked. I was wrong about the API, it must receive For now, we'll go with this approach @TomerHeber as discussed, this only needs some tests |
f564034
to
6209d6a
Compare
68938a7
to
9b4dc34
Compare
9b4dc34
to
0f0b2ba
Compare
@@ -100,6 +100,18 @@ func (client *ApiClient) ConfigurationVariablesByScope(scope Scope, scopeId stri | |||
if err != nil { | |||
return []ConfigurationVariable{}, err | |||
} | |||
|
|||
if scope != ScopeGlobal { |
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.
@RLRabinowitz - decided to fix the issue here. This covers much more use-cases.
I hope it makes sense: I filter out the global scope if the requested scope isn't global.
@@ -247,7 +263,7 @@ var _ = Describe("Configuration Variable", func() { | |||
|
|||
Describe("ConfigurationVariablesByScope", func() { | |||
var returnedVariables []ConfigurationVariable | |||
mockVariables := []ConfigurationVariable{mockConfigurationVariable} | |||
mockVariables := []ConfigurationVariable{mockConfigurationVariable, mockGlobalConfigurationVariable} |
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.
As discussed. Added the use-case to the unit tests.
Note: I was unable to get the acceptance test working due to timeout. |
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.
Looks good 👍🏻
Environment resource configuration field is affected by global scope variables
Issue & Steps to Reproduce / Feature Request
fixes #318
Solution
In the environment resource: filter out any configuration that is not within the environment scope.