go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/providers/os/resources/logindefs_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  )
    11  
    12  func TestResource_LoginDefs(t *testing.T) {
    13  	t.Run("logindefs params", func(t *testing.T) {
    14  		res := x.TestQuery(t, "logindefs.params")
    15  		assert.NotEmpty(t, res)
    16  	})
    17  
    18  	t.Run("specific logindefs param", func(t *testing.T) {
    19  		res := x.TestQuery(t, "logindefs.params[\"UID_MIN\"]")
    20  		assert.NotEmpty(t, res)
    21  		assert.Empty(t, res[0].Result().Error)
    22  		assert.Equal(t, "1000", res[0].Data.Value)
    23  	})
    24  }