Skip to content

Commit

Permalink
move tests using staging index to production one
Browse files Browse the repository at this point in the history
  • Loading branch information
umbynos committed Mar 25, 2024
1 parent f6a4740 commit b213179
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions index/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down Expand Up @@ -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())

Expand Down
2 changes: 1 addition & 1 deletion tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions v2/pkgs/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down Expand Up @@ -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())

Expand Down Expand Up @@ -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())

Expand Down

0 comments on commit b213179

Please sign in to comment.