From b23411fe58289b1a5212e5075d82cfe1216222b6 Mon Sep 17 00:00:00 2001 From: sh0rez Date: Tue, 29 Oct 2019 22:16:59 +0100 Subject: [PATCH] fix: add sum to integration test --- cmd/jb/install_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/jb/install_test.go b/cmd/jb/install_test.go index 48546cc..8b16c2d 100644 --- a/cmd/jb/install_test.go +++ b/cmd/jb/install_test.go @@ -44,13 +44,13 @@ func TestInstallCommand(t *testing.T) { URIs: []string{"github.com/jsonnet-bundler/jsonnet-bundler@v0.1.0"}, ExpectedCode: 0, 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", "sum": "W1uI550rQ66axRpPXA2EZDquyPg/5PHZlvUz1NEzefg="}]}`), }, { Name: "Relative", URIs: []string{"jsonnet/foobar"}, ExpectedCode: 0, ExpectedJsonnetFile: []byte(`{"dependencies": [{"name": "foobar", "source": {"local": {"directory": "jsonnet/foobar"}}, "version": ""}]}`), - ExpectedJsonnetLockFile: []byte(`{"dependencies": [{"name": "foobar", "source": {"local": {"directory": "jsonnet/foobar"}}, "version": ""}]}`), + ExpectedJsonnetLockFile: []byte(`{"dependencies": [{"name": "foobar", "source": {"local": {"directory": "jsonnet/foobar"}}, "version": "", "sum": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="}]}`), }, } @@ -74,7 +74,7 @@ func TestInstallCommand(t *testing.T) { jsonnetFileContent(t, jsonnetfile.File, []byte(`{}`)) - installCommand("", "vendor", tc.URIs...) + installCommand("", "vendor", tc.URIs) jsonnetFileContent(t, jsonnetfile.File, tc.ExpectedJsonnetFile) jsonnetFileContent(t, jsonnetfile.LockFile, tc.ExpectedJsonnetLockFile)