github.com/please-build/go-rules/tools/please_go@v0.0.0-20240319165128-ea27d6f5caba/install/toolchain/toolchain_test.go (about)

     1  package toolchain
     2  
     3  import (
     4  	"github.com/stretchr/testify/require"
     5  	"os"
     6  	"path/filepath"
     7  	"testing"
     8  )
     9  
    10  func TestGetVersion(t *testing.T) {
    11  	tc := &Toolchain{GoTool: filepath.Join(os.Getenv("DATA"), "bin/go")}
    12  
    13  	ver, err := tc.GoMinorVersion()
    14  	require.NoError(t, err)
    15  	require.GreaterOrEqual(t, ver, 21)
    16  }