Skip to content

Commit d0a4b5c

Browse files
committed
Update idempotency flags / reasons in operation tests.
1 parent 1a532cb commit d0a4b5c

38 files changed

+82
-79
lines changed

tests/operations/dnf.rpm/add.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
},
1313
"commands": [
1414
"rpm -i something.rpm"
15-
],
16-
"idempotent": false
15+
]
1716
}

tests/operations/dnf.rpm/add_existing_upgrade.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
}
1212
}
1313
},
14-
"commands": ["rpm -i something.rpm"],
15-
"idempotent": false
14+
"commands": ["rpm -i something.rpm"]
1615
}

tests/operations/dnf.rpm/add_url.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616
"curl -sSLf https://something.rpm -o _tempfile_.rpm",
1717
"rpm -q `rpm -qp _tempfile_.rpm` 2> /dev/null || rpm -i _tempfile_.rpm"
1818
],
19-
"idempotent": false
19+
"second_output_commands": [
20+
"rpm -q `rpm -qp _tempfile_.rpm` 2> /dev/null || rpm -i _tempfile_.rpm"
21+
],
22+
"idempotent": false,
23+
"disable_itempotent_warning_reason": "packages that require downloads cannot be checked for presence during fact gathering"
2024
}

tests/operations/dnf.rpm/remove.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@
1616
},
1717
"commands": [
1818
"dnf remove -y something"
19-
],
20-
"idempotent": false
19+
]
2120
}

tests/operations/files.download/download_cache_time.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
"command=curl": "yes"
1616
}
1717
},
18-
"commands": []
18+
"commands": [],
19+
"noop_description": "file /home/myfile has already been downloaded"
1920
}

tests/operations/files.download/download_cache_time_needs_refresh.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@
1717
},
1818
"commands": [
1919
"curl -sSLf http://myfile -o /home/myfile"
20-
],
21-
"idempotent": false
20+
]
2221
}

tests/operations/files.sync/sync_exclude_multiple.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@
9292
"/home/somedir/underthat/another_file.txt"
9393
],
9494
"chmod 644 /home/somedir/underthat/another_file.txt"
95-
],
96-
"idempotent": false
95+
]
9796
}

tests/operations/files.sync/sync_no_destination_exist.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@
5050
"/home/somedir/underthat/another-file.txt"
5151
],
5252
"chmod 644 /home/somedir/underthat/another-file.txt"
53-
],
54-
"idempotent": false
53+
]
5554
}

tests/operations/git.bare_repo/delete.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
},
1111
"commands": [
1212
"rm -rf /home/mybarerepo.git"
13-
],
14-
"idempotent": false
13+
]
1514
}

tests/operations/git.repo/branch_pull.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919
"cd /home/myrepo && git checkout mybranch",
2020
"cd /home/myrepo && git pull"
2121
],
22-
"idempotent": false
22+
"second_output_commands": [
23+
"cd /home/myrepo && git pull"
24+
],
25+
"idempotent": false,
26+
"disable_itempotent_warning_reason": "git branch pull always executed"
2327
}

0 commit comments

Comments
 (0)