mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50:05 +01:00
For local dependencies check if abs path exists
This commit is contained in:
parent
e655fcaf60
commit
6ed6c3f3ec
4 changed files with 11 additions and 8 deletions
|
|
@ -49,8 +49,8 @@ func TestInstallCommand(t *testing.T) {
|
|||
Name: "Relative",
|
||||
URLs: []string{"test/jsonnet/foobar"},
|
||||
ExpectedCode: 0,
|
||||
ExpectedJsonnetFile: []byte(`{"dependencies":null}`),
|
||||
ExpectedJsonnetLockFile: []byte(`{"dependencies":null}`),
|
||||
ExpectedJsonnetFile: []byte(`{"dependencies": [{"name": "foobar", "source": {"local": {"directory": "test/jsonnet/foobar"}}, "version": ""}]}`),
|
||||
ExpectedJsonnetLockFile: []byte(`{"dependencies": [{"name": "foobar", "source": {"local": {"directory": "test/jsonnet/foobar"}}, "version": ""}]}`),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -81,6 +81,8 @@ func TestInstallCommand(t *testing.T) {
|
|||
}
|
||||
|
||||
func jsonnetFileContent(t *testing.T, filename string, content []byte) {
|
||||
t.Helper()
|
||||
|
||||
bytes, err := ioutil.ReadFile(filename)
|
||||
assert.NoError(t, err)
|
||||
if eq := assert.JSONEq(t, string(content), string(bytes)); !eq {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue