2024-02-05 15:29:45 +00:00
|
|
|
package libraries
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/databricks/databricks-sdk-go/service/compute"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestLibraryPath(t *testing.T) {
|
|
|
|
path := "/some/path"
|
|
|
|
|
|
|
|
assert.Equal(t, path, libraryPath(&compute.Library{Whl: path}))
|
|
|
|
assert.Equal(t, path, libraryPath(&compute.Library{Jar: path}))
|
|
|
|
assert.Equal(t, path, libraryPath(&compute.Library{Egg: path}))
|
2024-08-21 10:03:56 +00:00
|
|
|
assert.Equal(t, path, libraryPath(&compute.Library{Requirements: path}))
|
2024-02-05 15:29:45 +00:00
|
|
|
assert.Equal(t, "", libraryPath(&compute.Library{}))
|
|
|
|
}
|