Skip to content

Commit d9c0450

Browse files
committed
first attempt at testing FileBot output
1 parent 86d7d0d commit d9c0450

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

playbook.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
# ansible-playbook -i <host>, playbook.yml
33
- hosts: all
44
tasks:
5+
- name: test
6+
ansible.builtin.include_tasks: test.yml
7+
args:
8+
apply:
9+
tags:
10+
- test
11+
delegate_to: 127.0.0.1
12+
tags:
13+
- test
14+
loop:
15+
- { input: 'Chainsaw Man', output: 'Anime/Chainsaw Man (2022)/Season 1 (2022)/Chainsaw Man - 1x01 (01) - DOG & CHAINSAW', db: 'AniDB', format: 'animeFormat.groovy', extra: "--filter 's == 1 && e == 1'" }
16+
517
- name: copy qbittorrent script
618
copy:
719
src: qbittorrent-postprocess

test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: test output
3+
ansible.builtin.command:
4+
cmd: /usr/local/bin/filebot -list --q {{ item.input }} --db {{ item.db }} --format {{ item.format }} {{ item.extra | d() }}
5+
changed_when: false
6+
register: result
7+
8+
- name: test
9+
ansible.builtin.assert:
10+
that: result.stdout_lines[-1] == item.output

0 commit comments

Comments
 (0)