mirror of https://github.com/databricks/cli.git
fix syntax_error in fake workspace
This commit is contained in:
parent
27cb55e46f
commit
adee4c9998
|
@ -4,7 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"path"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -77,11 +77,11 @@ func (s *FakeWorkspace) WorkspaceDelete(path string, recursive bool) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FakeWorkspace) WorkspaceFilesImportFile(path string, body []byte) {
|
func (s *FakeWorkspace) WorkspaceFilesImportFile(p string, body []byte) {
|
||||||
if !strings.HasPrefix(path, "/") {
|
if !strings.HasPrefix(p, "/") {
|
||||||
path = "/" + path
|
p = "/" + p
|
||||||
}
|
}
|
||||||
s.files[path] = body
|
s.files[p] = body
|
||||||
|
|
||||||
for {
|
for {
|
||||||
p = path.Dir(p)
|
p = path.Dir(p)
|
||||||
|
@ -91,8 +91,6 @@ func (s *FakeWorkspace) WorkspaceFilesImportFile(path string, body []byte) {
|
||||||
|
|
||||||
s.directories[p] = true
|
s.directories[p] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
return "{}", http.StatusOK
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FakeWorkspace) JobsCreate(request jobs.CreateJob) Response {
|
func (s *FakeWorkspace) JobsCreate(request jobs.CreateJob) Response {
|
||||||
|
|
Loading…
Reference in New Issue