# # # add_file "tests/t_serve_ignores_mt_options.at" # content [ab8c5d1a6a2eae5282dc0fbecc72bbb0cc9e52c4] # # patch "ChangeLog" # from [ea9e28f94c723372b1f8b785a3b300852f982c2e] # to [b7922281f68bf2b7c18f816c9e0ae1001f355ff4] # # patch "testsuite.at" # from [1256e25bb2800270d29e8edd597e6b9d081119d3] # to [6f568aca0c8fa9b3f72958f365dde4a6f37a8dd0] # ============================================================ --- tests/t_serve_ignores_mt_options.at ab8c5d1a6a2eae5282dc0fbecc72bbb0cc9e52c4 +++ tests/t_serve_ignores_mt_options.at ab8c5d1a6a2eae5282dc0fbecc72bbb0cc9e52c4 @@ -0,0 +1,30 @@ +# -*- Autoconf -*- + +AT_SETUP([checking that certain commands ignores the contents of MT/options]) + +MONOTONE_SETUP + +NETSYNC_SETUP + +# Now, commit something to transfer +AT_DATA(testfile, [version 0 of test file +]) +AT_CHECK(MONOTONE add testfile, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --branch=testbranch commit --message blah-blah, [], [ignore], [ignore]) + +# Hack MT/options +AT_CHECK([sed -e 's/key ".*"/key "address@hidden"/' < MT/options > MT/options.new]) +AT_CHECK([mv MT/options.new MT/options]) +# Double-check that MT/options was correctly hacked +AT_CHECK([grep 'key "address@hidden"' MT/options], [1], [ignore], [ignore]) +AT_CHECK([grep 'key "address@hidden"' MT/options], [0], [ignore], [ignore]) + +# Let's see RUN_NETSYNC fly, making sure we use an existing key. Without the +# explicit --key option, this push would try to use the hacked identity and +# promptly fail, and that's not what we're after. +# The server, though, doesn't get this explicit key specification, so this +# will test if it (wrongly) gets a key value from MT/options or if it takes +# whatever key that's available in keys2/... +RUN_NETSYNC([push address@hidden, [testbranch]) + +AT_CLEANUP ============================================================ --- ChangeLog ea9e28f94c723372b1f8b785a3b300852f982c2e +++ ChangeLog b7922281f68bf2b7c18f816c9e0ae1001f355ff4 @@ -1,3 +1,10 @@ +2006-03-13 Richard Levitte + + * tests/t_serve_ignores_mt_options.at: New test to check that + 'monotone serve' really ignores the contents of an available + MT/options. + * testsuite.at: Use it. + 2006-03-12 Timothy Brownawell * netsync.cc (session::maybe_note_epochs_finished): only begin the ============================================================ --- testsuite.at 1256e25bb2800270d29e8edd597e6b9d081119d3 +++ testsuite.at 6f568aca0c8fa9b3f72958f365dde4a6f37a8dd0 @@ -795,3 +795,4 @@ m4_include(tests/t_revert_move_to_renamed_dir.at) m4_include(tests/t_sink_has_extra_epochs.at) m4_include(tests/t_disapprove_branch.at) +m4_include(tests/t_serve_ignores_mt_options.at)