fix(actions): cross platform watch dir file handling (#458)

* chore: update deps

* fix(actions): cross-platform file handling

* fix(qbittorrent): unrelated failing test
This commit is contained in:
ze0s 2022-09-10 20:31:46 +02:00 committed by GitHub
parent 8b96f29f37
commit bbb8d2fe6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 129 additions and 123 deletions

View file

@ -1,9 +1,9 @@
package red
import (
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
@ -28,7 +28,7 @@ func TestREDClient_GetTorrentByID(t *testing.T) {
}
if !strings.Contains(r.RequestURI, "29991962") {
jsonPayload, _ := ioutil.ReadFile("testdata/get_torrent_by_id_not_found.json")
jsonPayload, _ := os.ReadFile("testdata/get_torrent_by_id_not_found.json")
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusBadRequest)
w.Write(jsonPayload)
@ -36,7 +36,7 @@ func TestREDClient_GetTorrentByID(t *testing.T) {
}
// read json response
jsonPayload, _ := ioutil.ReadFile("testdata/get_torrent_by_id.json")
jsonPayload, _ := os.ReadFile("testdata/get_torrent_by_id.json")
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
w.Write(jsonPayload)