fix(macros): torrentdata parsing (#757)

* fix(macros): Fix torrentdata parsing in macros.

* fix action test

* more dead code

* hunting demons

* limit success output
This commit is contained in:
Kyle Sanderson 2023-03-19 12:53:42 -07:00 committed by GitHub
parent 92f2b0ebe3
commit 29bedc532d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 83 deletions

View file

@ -1,6 +1,7 @@
package action
import (
"context"
"testing"
"github.com/autobrr/autobrr/internal/domain"
@ -56,13 +57,7 @@ func Test_service_parseMacros(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &service{
log: logger.Mock().With().Logger(),
repo: nil,
clientSvc: nil,
bus: nil,
}
_ = s.parseMacros(tt.args.action, tt.args.release)
_ = tt.args.action.ParseMacros(&tt.args.release)
assert.Equalf(t, tt.want, tt.args.action.ExecArgs, "parseMacros(%v, %v)", tt.args.action, tt.args.release)
})
}
@ -101,7 +96,7 @@ func Test_service_execCmd(t *testing.T) {
clientSvc: nil,
bus: nil,
}
s.execCmd(nil, tt.args.action, tt.args.release)
s.execCmd(context.TODO(), tt.args.action, tt.args.release)
})
}
}