go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/_motor/providers/awsec2ebs/setup_unit_test.go (about)

     1  // Copyright (c) Mondoo, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package awsec2ebs
     5  
     6  import (
     7  	"math/rand"
     8  	"strings"
     9  	"testing"
    10  	"time"
    11  
    12  	"github.com/stretchr/testify/require"
    13  )
    14  
    15  func TestNewVolumeAttachmentLoc(t *testing.T) {
    16  	rand.Seed(time.Now().UnixNano())
    17  	loc1 := newVolumeAttachmentLoc()
    18  	require.Equal(t, len(loc1), 8)
    19  	require.Equal(t, strings.HasPrefix(loc1, "/dev/sd"), true)
    20  }