github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/pkg/nodeps/utils_test.go (about)

     1  package nodeps
     2  
     3  import (
     4  	"github.com/stretchr/testify/assert"
     5  	"testing"
     6  )
     7  
     8  // TestRandomString tests if RandomString returns the correct character length
     9  func TestRandomString(t *testing.T) {
    10  	randomString := RandomString(10)
    11  
    12  	// is RandomString as long as required
    13  	assert.Equal(t, 10, len(randomString))
    14  }