X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=cmd%2Fsafcm%2Fsync_changes_test.go;h=feb8dd34531f007072b391fbc11b82b1e05d3a50;hb=8222dd7be72bef3773eb66b04af6094e584b13fb;hp=d8ce97b2a876ea45c2d18d5d78f0959eb2e1fe17;hpb=367edc1286a52d96fcfef6f98330148cad8a64e1;p=safcm%2Fsafcm.git diff --git a/cmd/safcm/sync_changes_test.go b/cmd/safcm/sync_changes_test.go index d8ce97b..feb8dd3 100644 --- a/cmd/safcm/sync_changes_test.go +++ b/cmd/safcm/sync_changes_test.go @@ -125,7 +125,7 @@ func TestFormatChanges(t *testing.T) { }, }, }, - "\nexecuted 5 command(s): (dry-run)\n\"fake command\"\n\"fake command with no output\"\n\"fake command with newline\"\n\"fake command with more output\"\n\"fake failed command\"\n", + "\nwill execute 5 command(s): (dry-run)\n\"fake command\"\n\"fake command with no output\"\n\"fake command with newline\"\n\"fake command with more output\"\n\"fake failed command\"\n", }, { "command changes only, quiet & dry-run", @@ -151,7 +151,7 @@ func TestFormatChanges(t *testing.T) { }, }, }, - "executed 5 command(s) (dry-run)\n", + "will execute 5 command(s) (dry-run)\n", }, } @@ -543,7 +543,7 @@ func TestFormatFileChanges(t *testing.T) { }, }, }, - `changed 1 file(s): (dry-run) + `will change 1 file(s): (dry-run) "file": created, file, user(1000) group(2000), 0644 `, }, @@ -565,7 +565,7 @@ func TestFormatFileChanges(t *testing.T) { }, }, }, - "changed 1 file(s): (dry-run)\n\x1B[36m\"file\"\x1B[0m: \x1B[32mcreated\x1B[0m, file, user(1000) group(2000), 0644\n", + "will change 1 file(s): (dry-run)\n\x1B[36m\"file\"\x1B[0m: \x1B[32mcreated\x1B[0m, file, user(1000) group(2000), 0644\n", }, { @@ -723,7 +723,7 @@ func TestFormatPackageChanges(t *testing.T) { Name: "package-two", }, }, - `installed 2 package(s): (dry-run) + `will install 2 package(s): (dry-run) "package-one" "package-two" `, @@ -741,7 +741,7 @@ func TestFormatPackageChanges(t *testing.T) { Name: "package-two", }, }, - "installed 2 package(s): (dry-run)\n\x1b[36m\"package-one\"\x1b[0m\n\x1b[36m\"package-two\"\x1b[0m\n", + "will install 2 package(s): (dry-run)\n\x1b[36m\"package-one\"\x1b[0m\n\x1b[36m\"package-two\"\x1b[0m\n", }, { @@ -862,7 +862,7 @@ func TestFormatServiceChanges(t *testing.T) { Enabled: true, }, }, - `modified 3 service(s): (dry-run) + `will modify 3 service(s): (dry-run) "service-one": started "service-two": enabled "service-three": started, enabled @@ -888,7 +888,7 @@ func TestFormatServiceChanges(t *testing.T) { Enabled: true, }, }, - "modified 3 service(s): (dry-run)\n\x1b[36m\"service-one\"\x1b[0m: started\n\x1b[36m\"service-two\"\x1b[0m: enabled\n\x1b[36m\"service-three\"\x1b[0m: started, enabled\n", + "will modify 3 service(s): (dry-run)\n\x1b[36m\"service-one\"\x1b[0m: started\n\x1b[36m\"service-two\"\x1b[0m: enabled\n\x1b[36m\"service-three\"\x1b[0m: started, enabled\n", }, { @@ -1036,13 +1036,10 @@ func TestFormatCommandChanges(t *testing.T) { []safcm.CommandChange{ { Command: "fake command", - Output: "fake output", }, }, - `executed 1 command(s): (dry-run) -"fake command": - > fake output - > \ No newline at end of file + `will execute 1 command(s): (dry-run) +"fake command" `, }, @@ -1054,10 +1051,9 @@ func TestFormatCommandChanges(t *testing.T) { []safcm.CommandChange{ { Command: "fake command", - Output: "fake output", }, }, - "executed 1 command(s): (dry-run)\n\x1b[36m\"fake command\"\x1b[0m:\n > fake output\n > \\ No newline at end of file\n", + "will execute 1 command(s): (dry-run)\n\x1b[36m\"fake command\"\x1b[0m\n", }, { @@ -1191,7 +1187,7 @@ func TestFormatCommandChanges(t *testing.T) { Command: "fake failed command", }, }, - `executed 5 command(s) (dry-run) + `will execute 5 command(s) (dry-run) `, },