Bug 32030: fix test builder for boolean

assume that tinyint are boolean (not really true but shouldn't hurt)

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-02-24 14:21:33 +01:00 committed by Tomas Cohen Arazi
parent 2c9c10be8d
commit 7e0009e96a
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View 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};