Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit dd56b16

Browse files
committed
feat: non dynamic values
1 parent 7fa04f5 commit dd56b16

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dtos/rulesheets.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
type Rule struct {
1717
Condition string `json:"condition,omitempty"`
1818
Value interface{} `json:"value,omitempty"`
19+
Dynamic string `json:"dynamic,omitempty"`
1920
Type string `json:"type,omitempty"`
2021
}
2122

services/gitlab_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ func TestSaveTestFilesCreationWithRuleInterface(t *testing.T) {
321321
rules := []interface{}{
322322
&dtos.Rule{
323323
Condition: "test",
324+
Dynamic: "false",
324325
Value: map[string]string{
325326
"nomeAplicativo": "testAplicativo",
326327
"textoUrlPadrao": "testURLpadrao",
@@ -363,7 +364,7 @@ func TestSaveTestFilesCreationWithRuleInterface(t *testing.T) {
363364
parameters := c["actions"].([]interface{})[3].(map[string]interface{})["content"].(string)
364365
assert.Equal(t, "[]", parameters)
365366
rulesFeatws := c["actions"].([]interface{})[4].(map[string]interface{})["content"].(string)
366-
assert.Equal(t, "{\n \"tags\": [\n {\n \"condition\": \"test\",\n \"value\": {\n \"nomeAplicativo\": \"testAplicativo\",\n \"textoUrlDesvio\": \"testURLdesvio\",\n \"textoUrlPadrao\": \"testURLpadrao\"\n },\n \"type\": \"testType\"\n }\n ]\n}", rulesFeatws)
367+
assert.Equal(t, "{\n \"tags\": [\n {\n \"condition\": \"test\",\n \"value\": {\n \"nomeAplicativo\": \"testAplicativo\",\n \"textoUrlDesvio\": \"testURLdesvio\",\n \"textoUrlPadrao\": \"testURLpadrao\"\n },\n \"dynamic\": \"false\",\n \"type\": \"testType\"\n }\n ]\n}", rulesFeatws)
367368

368369
w.Write(data)
369370
return

0 commit comments

Comments
 (0)