mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 16:10:04 +01:00
fix: unmarshal legacyImports
This commit is contained in:
parent
e28e7ff55b
commit
fcac885ce2
3 changed files with 5 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/jsonnet-bundler/jsonnet-bundler/spec/v1/deps"
|
||||
)
|
||||
|
||||
const initContents = `{"version": 1, "dependencies": [], "legacyImports": false}`
|
||||
const initContents = `{"version": 1, "dependencies": [], "legacyImports": true}`
|
||||
|
||||
func TestInstallCommand(t *testing.T) {
|
||||
testInstallCommandWithJsonnetHome(t, "vendor")
|
||||
|
|
@ -59,14 +59,14 @@ func testInstallCommandWithJsonnetHome(t *testing.T, jsonnetHome string) {
|
|||
Name: "OneURL",
|
||||
URIs: []string{"github.com/jsonnet-bundler/jsonnet-bundler@v0.1.0"},
|
||||
ExpectedCode: 0,
|
||||
ExpectedJsonnetFile: []byte(`{"version": 1, "dependencies": [{"source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "v0.1.0"}], "legacyImports": false}`),
|
||||
ExpectedJsonnetFile: []byte(`{"version": 1, "dependencies": [{"source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "v0.1.0"}], "legacyImports": true}`),
|
||||
ExpectedJsonnetLockFile: []byte(`{"version": 1, "dependencies": [{"source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "080f157c7fb85ad0281ea78f6c641eaa570a582f", "sum": "W1uI550rQ66axRpPXA2EZDquyPg/5PHZlvUz1NEzefg="}], "legacyImports": false}`),
|
||||
},
|
||||
{
|
||||
Name: "Local",
|
||||
URIs: []string{"jsonnet/foobar"},
|
||||
ExpectedCode: 0,
|
||||
ExpectedJsonnetFile: []byte(`{"version": 1, "dependencies": [{"source": {"local": {"directory": "jsonnet/foobar"}}, "version": ""}], "legacyImports": false}`),
|
||||
ExpectedJsonnetFile: []byte(`{"version": 1, "dependencies": [{"source": {"local": {"directory": "jsonnet/foobar"}}, "version": ""}], "legacyImports": true}`),
|
||||
ExpectedJsonnetLockFile: []byte(`{"version": 1, "dependencies": [{"source": {"local": {"directory": "jsonnet/foobar"}}, "version": ""}], "legacyImports": false}`),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue