-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AST-26691 - CLI | Support PACKAGE_ENFORCEMENT_ENABLED feature flags |…
… wrap JWT enforcement with feature flag - Move tenant id handling inside feature-flags-http.go so that we can mock it in unit tests
- Loading branch information
1 parent
5913004
commit 2e202ab
Showing
3 changed files
with
16 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
package mock | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/checkmarx/ast-cli/internal/wrappers" | ||
) | ||
|
||
type FeatureFlagsMockWrapper struct{} | ||
|
||
func (f FeatureFlagsMockWrapper) GetAll(string) (*wrappers.FeatureFlagsResponseModel, error) { | ||
allowedEngines := make(map[string]bool) | ||
engines := []string{"sast", "iac-security", "sca", "api-security"} | ||
for _, value := range engines { | ||
allowedEngines[strings.ToLower(value)] = true | ||
} | ||
func (f FeatureFlagsMockWrapper) GetAll() (*wrappers.FeatureFlagsResponseModel, error) { | ||
return &wrappers.FeatureFlagsResponseModel{}, nil | ||
} |