Skip to content

Commit

Permalink
fix: some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
celaus committed Dec 5, 2024
1 parent 31706a9 commit c21ac78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion coralogix/resource_coralogix_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func flattenScopeFilters(filters []*cxsdk.ScopeFilter) []ScopeFilterModel {
for _, filter := range filters {

entityTypeRaw := strings.ToLower(cxsdk.EntityTypeNameLookup[int32(filter.GetEntityType())])
entityType, _ := strings.CutPrefix(entityTypeRaw, "ENTITY_TYPE_")
entityType, _ := strings.CutPrefix(entityTypeRaw, "entity_type_")
result = append(result, ScopeFilterModel{
EntityType: types.StringValue(entityType),
Expression: types.StringValue(filter.GetExpression()),
Expand Down
10 changes: 5 additions & 5 deletions coralogix/resource_coralogix_tco_policies_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ var (
tcoPoliciesPriorityProtoToSchema = ReverseMap(tcoPoliciesPrioritySchemaToProto)
tcoPoliciesValidPriorities = GetKeys(tcoPoliciesPrioritySchemaToProto)
tcoPoliciesRuleTypeSchemaToProto = map[string]cxsdk.TCOPolicyRuleTypeID{
"is": cxsdk.TCOPolicyRuleTypeIDUnspecified,
"is_not": cxsdk.TCOPolicyRuleTypeIDIs,
"starts_with": cxsdk.TCOPolicyRuleTypeIDIsNot,
"includes": cxsdk.TCOPolicyRuleTypeIDStartWith,
"unspecified": cxsdk.TCOPolicyRuleTypeIDIncludes,
"is": cxsdk.TCOPolicyRuleTypeIDIs,
"is_not": cxsdk.TCOPolicyRuleTypeIDIsNot,
"starts_with": cxsdk.TCOPolicyRuleTypeIDStartWith,
"includes": cxsdk.TCOPolicyRuleTypeIDIncludes,
"unspecified": cxsdk.TCOPolicyRuleTypeIDUnspecified,
}
tcoPoliciesRuleTypeProtoToSchema = ReverseMap(tcoPoliciesRuleTypeSchemaToProto)
tcoPoliciesValidRuleTypes = GetKeys(tcoPoliciesRuleTypeSchemaToProto)
Expand Down

0 comments on commit c21ac78

Please sign in to comment.