feat(actions): simplify macro parsing (#560)

* refactor(action): parse macros

* feat(action): add ctx to arr clients and test
This commit is contained in:
ze0s 2022-12-10 21:48:19 +01:00 committed by GitHub
parent f6e68fae2b
commit 839eb9f3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 323 additions and 334 deletions

View file

@ -1,6 +1,7 @@
package readarr
import (
"context"
"net/http"
"net/http/httptest"
"os"
@ -78,7 +79,7 @@ func Test_client_Push(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
c := New(tt.fields.config)
rejections, err := c.Push(tt.args.release)
rejections, err := c.Push(context.Background(), tt.args.release)
assert.Equal(t, tt.rejections, rejections)
if tt.wantErr && assert.Error(t, err) {
assert.Equal(t, tt.err, err)
@ -147,7 +148,7 @@ func Test_client_Test(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
c := New(tt.cfg)
got, err := c.Test()
got, err := c.Test(context.Background())
if tt.wantErr && assert.Error(t, err) {
assert.EqualErrorf(t, err, tt.expectedErr, "Error should be: %v, got: %v", tt.wantErr, err)
}