Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: santoshkal <ksantosh@intelops.dev>
  • Loading branch information
santoshkal committed Dec 5, 2023
1 parent 9207fe0 commit 4fb199c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
5 changes: 4 additions & 1 deletion pkg/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
"testing"

log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -144,7 +145,9 @@ func TestReadRegoFile(t *testing.T) {
}

// Create a sample file for testing
os.WriteFile("test.rego", []byte("package test\n\ntest content from file"), 0644)
if err := os.WriteFile("test.rego", []byte("package test\n\ntest content from file"), 0644); err != nil {
log.Println("Failed to write to file:", err)
}
defer os.Remove("test.rego")

for _, tt := range tests {
Expand Down
13 changes: 0 additions & 13 deletions pkg/validate/validateinputJSON_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ import (
"github.com/stretchr/testify/assert"
)

// Successfully parse valid YAML input
func test_valid_yaml_input(t *testing.T) {
yamlContent := `
key1: value1
key2: value2
`
regoPolicyPath := "./testdata/rego/inputfile_policies.rego"

err := ValidateInput(yamlContent, regoPolicyPath)

assert.NoError(t, err)
}

// Successfully parse valid YAML input
func TestValidYAMLInput(t *testing.T) {
// Mock input
Expand Down

0 comments on commit 4fb199c

Please sign in to comment.