[Rt-commit] rt branch, 4.4/fix-oracle-munge-tests, created. rt-4.4.4beta1-21-gce39808e0
? sunnavy
sunnavy at bestpractical.com
Fri Feb 1 08:02:11 EST 2019
The branch, 4.4/fix-oracle-munge-tests has been created
at ce39808e0c4425ea2888eee9bd19b18fbdbfa39c (commit)
- Log -----------------------------------------------------------------
commit ce39808e0c4425ea2888eee9bd19b18fbdbfa39c
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 1 20:41:59 2019 +0800
Fix munge failed tests on Oracle caused by ticket id with utf8 flag
As $ticket->id had utf8 flag on on Oracle, the whole args string sent to
rt-munge-attachments has utf8 flag on, which confused the UTF8 decoding
process in rt-munge-attachments.
This commit fixes this by removing the utf8 flag from $ticket->id before
passing it to rt-munge-attachments.
diff --git a/t/api/attachment.t b/t/api/attachment.t
index 35906bbc0..0619c6b03 100644
--- a/t/api/attachment.t
+++ b/t/api/attachment.t
@@ -179,16 +179,23 @@ diag 'Test clearing and replacing header and content in attachments from example
}
}
+ my $ticket_id = $ticket->id;
+
+ # ticket id could have utf8 flag on On Oracle :/
+ if ( utf8::is_utf8($ticket_id) ) {
+ $ticket_id = Encode::encode( 'UTF-8', $ticket_id );
+ }
+
RT::Test->run_and_capture(
command => $RT::SbinPath . '/rt-munge-attachments',
- tickets => $ticket->id,
+ tickets => $ticket_id,
search => 'Grüßen',
replacement => 'anonymous',
);
RT::Test->run_and_capture(
command => $RT::SbinPath . '/rt-munge-attachments',
- tickets => $ticket->id,
+ tickets => $ticket_id,
search => '"Stever, Gregor" <gst at example.com>',
replacement => 'anon at example.com',
);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list