From b213179da83ff9056482da6c9f8ccc937cb11a1f Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Mon, 25 Mar 2024 18:01:24 +0100 Subject: [PATCH] move tests using staging index to production one --- index/index_test.go | 4 ++-- main_test.go | 4 ++-- tools/tools.go | 2 +- v2/pkgs/tools_test.go | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/index/index_test.go b/index/index_test.go index ea6433574..4a19a02be 100644 --- a/index/index_test.go +++ b/index/index_test.go @@ -9,12 +9,12 @@ import ( ) func TestInit(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index tempDir := paths.New(t.TempDir()).Join(".arduino-create") Index := Init(indexURL, tempDir) require.DirExists(t, tempDir.String()) - fileName := "package_staging_index.json" + fileName := "package_index.json" signatureName := fileName + ".sig" parsedURL, _ := url.Parse(indexURL) require.Equal(t, Index.IndexURL, *parsedURL) diff --git a/main_test.go b/main_test.go index 9abb5d781..c8276bba8 100644 --- a/main_test.go +++ b/main_test.go @@ -89,7 +89,7 @@ func TestUploadHandlerAgainstEvilFileNames(t *testing.T) { func TestInstallToolV2(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -170,7 +170,7 @@ func TestInstallToolV2(t *testing.T) { } func TestInstalledHead(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) diff --git a/tools/tools.go b/tools/tools.go index ac3e6109b..e641db351 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -37,7 +37,7 @@ import ( // Usage: // You have to call the New() function passing it the required parameters: // -// index = index.Init("https://downloads.arduino.cc/packages/package_staging_index.json", dataDir) +// index = index.Init("https://downloads.arduino.cc/packages/package_index.json", dataDir) // tools := tools.New(dataDir, index, logger) // Tools will represent the installed tools diff --git a/v2/pkgs/tools_test.go b/v2/pkgs/tools_test.go index ae76ebfa0..78c56398f 100644 --- a/v2/pkgs/tools_test.go +++ b/v2/pkgs/tools_test.go @@ -41,7 +41,7 @@ func TestTools(t *testing.T) { } defer os.RemoveAll(tmp) - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -122,7 +122,7 @@ func TestEvilFilename(t *testing.T) { // Initialize indexes with a temp folder tmp := t.TempDir() - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -191,7 +191,7 @@ func TestInstalledHead(t *testing.T) { // Initialize indexes with a temp folder tmp := t.TempDir() - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir())