go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/providers/os/resources/files_test.go (about)

     1  // Copyright (c) Mondoo, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package resources_test
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/stretchr/testify/assert"
    10  	"go.mondoo.com/cnquery/providers-sdk/v1/testutils"
    11  )
    12  
    13  func TestResource_FilesFind(t *testing.T) {
    14  	res := x.TestQuery(t, "files.find(from: '/etc').list")
    15  	assert.NotEmpty(t, res)
    16  	testutils.TestNoResultErrors(t, res)
    17  	assert.Equal(t, 5, len(res[0].Data.Value.([]interface{})))
    18  }