Fix install integration tests by using v0.1.0 of jb

This commit is contained in:
Matthias Loibl 2019-07-23 13:44:51 -07:00
parent ce22ada9e2
commit 9d10f90924
No known key found for this signature in database
GPG key ID: 78A796CA74CA38BA

View file

@ -46,11 +46,11 @@ func TestInstallCommand(t *testing.T) {
{ {
Scheme: "https", Scheme: "https",
Host: "github.com", Host: "github.com",
Path: "jsonnet-bundler/jsonnet-bundler", Path: "jsonnet-bundler/jsonnet-bundler@v0.1.0",
}, },
}, },
ExpectedCode: 0, ExpectedCode: 0,
ExpectedJsonnetFile: []byte(`{"dependencies": [{"name": "jsonnet-bundler", "source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "master"}]}`), ExpectedJsonnetFile: []byte(`{"dependencies": [{"name": "jsonnet-bundler", "source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "v0.1.0"}]}`),
ExpectedJsonnetLockFile: []byte(`{"dependencies": [{"name": "jsonnet-bundler", "source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "080f157c7fb85ad0281ea78f6c641eaa570a582f"}]}`), ExpectedJsonnetLockFile: []byte(`{"dependencies": [{"name": "jsonnet-bundler", "source": {"git": {"remote": "https://github.com/jsonnet-bundler/jsonnet-bundler", "subdir": ""}}, "version": "080f157c7fb85ad0281ea78f6c641eaa570a582f"}]}`),
}, },
} }
@ -60,6 +60,7 @@ func TestInstallCommand(t *testing.T) {
tempDir, err := ioutil.TempDir("", "jb-install") tempDir, err := ioutil.TempDir("", "jb-install")
assert.NoError(t, err) assert.NoError(t, err)
defer os.Remove(tempDir) defer os.Remove(tempDir)
defer os.RemoveAll("vendor") // delete test vendor folder
jsonnetFile := filepath.Join(tempDir, jsonnetfile.File) jsonnetFile := filepath.Join(tempDir, jsonnetfile.File)
jsonnetLockFile := filepath.Join(tempDir, jsonnetfile.LockFile) jsonnetLockFile := filepath.Join(tempDir, jsonnetfile.LockFile)