mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
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:
parent
92f2b0ebe3
commit
29bedc532d
6 changed files with 54 additions and 83 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue