mirror of https://github.com/databricks/cli.git
Fixed python wheel test (#608)
## Changes Fixed python wheel test ## Tests <!-- How is this tested? -->
This commit is contained in:
parent
1d21d3cfd3
commit
5e0a096722
|
@ -39,7 +39,9 @@ jobs:
|
|||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
|
||||
- name: Pull external libraries
|
||||
run: make vendor
|
||||
run: |
|
||||
make vendor
|
||||
pip install wheel
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
|
|
@ -5,7 +5,7 @@ artifacts:
|
|||
my_test_code:
|
||||
type: whl
|
||||
path: "./my_test_code"
|
||||
build: "/usr/local/bin/python setup.py bdist_wheel"
|
||||
build: "python setup.py bdist_wheel"
|
||||
|
||||
resources:
|
||||
jobs:
|
||||
|
|
|
@ -2,18 +2,15 @@ package bundle
|
|||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/databricks/cli/bundle"
|
||||
"github.com/databricks/cli/bundle/phases"
|
||||
"github.com/databricks/cli/internal"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAccBundlePythonWheelBuild(t *testing.T) {
|
||||
t.Log(internal.GetEnvOrSkipTest(t, "CLOUD_ENV"))
|
||||
|
||||
func TestBundlePythonWheelBuild(t *testing.T) {
|
||||
b, err := bundle.Load("./python_wheel")
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -21,6 +18,7 @@ func TestAccBundlePythonWheelBuild(t *testing.T) {
|
|||
err = m.Apply(context.Background(), b)
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = os.Stat("./python_wheel/my_test_code/dist/my_test_code-0.0.1-py2-none-any.whl")
|
||||
matches, err := filepath.Glob("python_wheel/my_test_code/dist/my_test_code-*.whl")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 1, len(matches))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue