Bug 32030: fix test builder for boolean
[srvgit] / t / lib / TestBuilder.pm
index f648af7..e066c2f 100644 (file)
@@ -451,7 +451,7 @@ sub _should_be_fk {
 
 sub _gen_type {
     return {
-        tinyint   => \&_gen_int,
+        tinyint   => \&_gen_bool,
         smallint  => \&_gen_int,
         mediumint => \&_gen_int,
         integer   => \&_gen_int,
@@ -482,6 +482,11 @@ sub _gen_type {
     };
 };
 
+sub _gen_bool {
+    my ($self, $params) = @_;
+    return int( rand(2) );
+}
+
 sub _gen_int {
     my ($self, $params) = @_;
     my $data_type = $params->{info}->{data_type};