Orbit: Add early update checks before starting sub-systems (#5885)

* Make orbit do a early check of updates

* Support orbit dev-mode

* Add test for NewRunner and Runner.UpdateAction

* Remove unnecessary parallel test
This commit is contained in:
Lucas Manuel Rodriguez
2022-06-01 14:47:04 -03:00
committed by GitHub
parent e0d7318236
commit 1406e186be
9 changed files with 114 additions and 52 deletions
+2 -2
View File
@@ -217,7 +217,7 @@ func TestUpdatesIntegration(t *testing.T) {
// Initialize an update client
localStore, err := filestore.New(filepath.Join(tmpDir, "tuf-metadata.json"))
require.NoError(t, err)
updater, err := update.New(update.Options{
updater, err := update.NewUpdater(update.Options{
RootDirectory: tmpDir,
ServerURL: server.URL,
RootKeys: roots,
@@ -354,7 +354,7 @@ func TestUpdatesIntegration(t *testing.T) {
tmpDir = t.TempDir()
localStore, err = filestore.New(filepath.Join(tmpDir, "tuf-metadata.json"))
require.NoError(t, err)
updater, err = update.New(update.Options{RootDirectory: tmpDir, ServerURL: server.URL, RootKeys: roots, LocalStore: localStore})
updater, err = update.NewUpdater(update.Options{RootDirectory: tmpDir, ServerURL: server.URL, RootKeys: roots, LocalStore: localStore})
require.NoError(t, err)
require.NoError(t, updater.UpdateMetadata())
}