github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/scanners/terraformplan/test/parser_test.go (about)

     1  package terraformplan
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/khulnasoft-lab/defsec/pkg/scanners/terraformplan/parser"
     7  	"github.com/stretchr/testify/assert"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func Test_Parse_Plan_File(t *testing.T) {
    12  
    13  	planFile, err := parser.New().ParseFile("testdata/plan.json")
    14  	require.NoError(t, err)
    15  
    16  	assert.NotNil(t, planFile)
    17  	fs, err := planFile.ToFS()
    18  	require.NoError(t, err)
    19  
    20  	assert.NotNil(t, fs)
    21  }