Skip to content

Commit c4159eb

Browse files
committed
Added test for converge_prepend
1 parent 8d2a63e commit c4159eb

4 files changed

Lines changed: 55 additions & 1 deletion

File tree

lib/files.cf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ bundle edit_line converge_prepend(marker, lines)
11041104
#
11051105
# ```cf3
11061106
# bundle agent pam_d_su_session
1107-
# # @brief Ensure /etc/pam.d/su has session configured properly
1107+
# #@brief Ensure /etc/pam.d/su has session configured properly
11081108
# {
11091109
# files:
11101110
# ubuntu::
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
body common control
2+
{
3+
inputs => { '../../default.cf.sub' };
4+
bundlesequence => { default("$(this.promise_filename)") };
5+
version => "1.0";
6+
}
7+
#######################################################
8+
9+
bundle common classes
10+
{
11+
classes:
12+
13+
"testing_masterfiles_policy_framework"
14+
scope => "namespace",
15+
comment => "This class is needed so that dcs.cf.sub includes the stdlib instead of using plucked.cf.sub from core which might get out of date and cause us to not test current code from the MPF.";
16+
}
17+
18+
bundle agent init
19+
{
20+
files:
21+
# The tested file "actual" is copied from our seeded starting position.
22+
"$(G.testfile)"
23+
copy_from => local_cp("$(this.promise_filename).start");
24+
25+
}
26+
27+
#######################################################
28+
29+
bundle agent test
30+
{
31+
meta:
32+
"description" -> { "CFE-3483" }
33+
string => "Test that converge_prepend works as expected";
34+
35+
files:
36+
"$(G.testfile)"
37+
edit_line => converge_prepend( "covfefe", "Despite the constant negative press covfefe" );
38+
39+
}
40+
41+
#######################################################
42+
43+
bundle agent check
44+
{
45+
methods:
46+
"Pass/FAIL"
47+
usebundle => dcs_check_diff($(G.testfile), "$(this.promise_filename).expected", $(this.promise_filename));
48+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Despite the constant negative press covfefe
2+
It has nothing to do with the oranges of the investigation, global waming, or hamberders
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hashtag #covfefe
2+
What is covfefe?
3+
It has nothing to do with the oranges of the investigation, global waming, or hamberders
4+
However, covfefe is bigger than the 2015 paris climate agreement.

0 commit comments

Comments
 (0)