github.com/aquasecurity/trivy-iac@v0.8.1-0.20240127024015-3d8e412cf0ab/pkg/scanners/terraform/parser/load_blocks_test.go (about)

     1  package parser
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestParsingDoubleComment(t *testing.T) {
    10  	ignores := parseIgnoresFromLine("## tfsec:ignore:abc")
    11  	assert.Equal(t, 1, len(ignores))
    12  	assert.Truef(t, ignores[0].Block, "Expected ignore to be a block")
    13  }