feat(db): store metadata as a file (#464)

* refactor: wrap errors

* feat(db): add the metadata file

* test(db): re-generate mocks

* fix(app): read metadata from the file in showVersion

* fix: open the database after downloading it

* fix(operation): use UpdateMetadata

* chore(mod): update dependency

* test(integration): fix tests

* fix(conf): rename TRIVY_NONSSL to TRIVY_NON_SSL
This commit is contained in:
Teppei Fukuda
2020-04-15 16:07:42 +03:00
committed by GitHub
parent 329f245283
commit ac5f313129
23 changed files with 532 additions and 247 deletions

View File

@@ -330,7 +330,8 @@ func TestClientServer(t *testing.T) {
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
// Copy DB file
cacheDir := gunzipDB()
cacheDir, err := gunzipDB()
require.NoError(t, err)
defer os.RemoveAll(cacheDir)
port, err := getFreePort()