bin/summary: Fix --raw option
I wanted to inspect a summary file the other day and was saddened to find it was broken: $ ostree summary --raw error: No option specified; use -u to update summary Fix the test to do the normal thing of passing just --raw without --view. It's legal to pass --raw and --view, but it shouldn't be a requirement. Closes: #1336 Approved by: cgwalters
This commit is contained in:
parent
9856ed3840
commit
374f7fc973
|
|
@ -210,7 +210,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (opt_view)
|
else if (opt_view || opt_raw)
|
||||||
{
|
{
|
||||||
g_autoptr(GBytes) summary_data = NULL;
|
g_autoptr(GBytes) summary_data = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ assert_file_has_content_literal summary.txt "Timestamp (ostree.commit.timestamp)
|
||||||
echo "ok view summary"
|
echo "ok view summary"
|
||||||
|
|
||||||
# Check the summary can be viewed raw too.
|
# Check the summary can be viewed raw too.
|
||||||
${OSTREE} summary --view --raw > raw-summary.txt
|
${OSTREE} summary --raw > raw-summary.txt
|
||||||
assert_file_has_content_literal raw-summary.txt "('main', ("
|
assert_file_has_content_literal raw-summary.txt "('main', ("
|
||||||
assert_file_has_content_literal raw-summary.txt "('other', ("
|
assert_file_has_content_literal raw-summary.txt "('other', ("
|
||||||
assert_file_has_content_literal raw-summary.txt "{'ostree.summary.last-modified': <uint64"
|
assert_file_has_content_literal raw-summary.txt "{'ostree.summary.last-modified': <uint64"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue