github.com/jfrog/jfrog-cli-core/v2@v2.52.0/tests/jfrogclicore_test.go (about) 1 package tests 2 3 import ( 4 "github.com/stretchr/testify/assert" 5 "os" 6 "testing" 7 8 "github.com/jfrog/jfrog-cli-core/v2/utils/log" 9 clientLog "github.com/jfrog/jfrog-client-go/utils/log" 10 11 "github.com/jfrog/jfrog-cli-core/v2/utils/tests" 12 13 clientTests "github.com/jfrog/jfrog-client-go/utils/tests" 14 ) 15 16 const ( 17 CoreIntegrationTests = "github.com/jfrog/jfrog-cli-core/v2/tests" 18 ) 19 20 func init() { 21 log.SetDefaultLogger() 22 } 23 24 func TestUnitTests(t *testing.T) { 25 cleanUpJfrogHome, err := tests.SetJfrogHome() 26 if err != nil { 27 clientLog.Error(err) 28 os.Exit(1) 29 } 30 defer cleanUpJfrogHome() 31 32 packages := clientTests.GetTestPackages("./../...") 33 packages = clientTests.ExcludeTestsPackage(packages, CoreIntegrationTests) 34 assert.NoError(t, clientTests.RunTests(packages, false)) 35 }