Skip to content

Commit ac4269e

Browse files
committed
MBS-14183: Add placeholder emails to editors sin sample data dumps
updated test instructions moved to sample database dumps instead
1 parent 33a798c commit ac4269e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/MusicBrainz/Script/EntityDump.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ sub editors {
367367
$ids,
368368
);
369369

370+
my $editor_columns = $EDITOR_SANITISED_COLUMNS;
371+
$editor_columns =~ s/'' AS email/'editor-' || editor.id || '\@musicbrainz.invalid' AS email/;
372+
370373
# The editor table's 'area' column creates cycles between several tables,
371374
# so we only do this for areas that we know have been dumped. While it's
372375
# true that we can detect cycles in core_entity, that would prevent us

t/script/ExportAllTables.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use String::ShellQuote;
99
use Test::More;
1010
use Test::Routine;
1111
use Test::Routine::Util;
12-
use Test::Deep qw( cmp_deeply ignore );
12+
use Test::Deep qw( cmp_deeply ignore re );
1313
use MusicBrainz::Server::Test;
1414
use aliased 'MusicBrainz::Server::DatabaseConnectionFactory' => 'Databases';
1515
use utf8;
@@ -216,7 +216,7 @@ test all => sub {
216216
bio => undef,
217217
birth_date => undef,
218218
deleted => 0,
219-
email => '',
219+
email => re(qr/^editor-\d+\@musicbrainz\.invalid$/),
220220
email_confirm_date => '2013-07-26 11:48:31.088042+00',
221221
gender => undef,
222222
ha1 => '03503a81a03bdbb6055f4a6c8b86b5b8',
@@ -234,7 +234,7 @@ test all => sub {
234234
bio => undef,
235235
birth_date => undef,
236236
deleted => 0,
237-
email => '',
237+
email => re(qr/^editor-\d+\@musicbrainz\.invalid$/),
238238
email_confirm_date => '2020-11-26 01:13:57.82052+00',
239239
gender => undef,
240240
ha1 => '62918b6c0e34b4bf056ecad67c96b765',

0 commit comments

Comments
 (0)