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:
parent
2c9c10be8d
commit
7e0009e96a
1 changed files with 6 additions and 1 deletions
|
@ -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};
|
||||
|
|
Loading…
Reference in a new issue