Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use travis, fix bug in fuzzer rounding
- Loading branch information
Showing
7 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
language: ruby | ||
cache: bundler | ||
|
||
rvm: | ||
- 2.3 | ||
|
||
services: | ||
- mysql | ||
- mysql | ||
|
||
before_script: | ||
- cp .travis/my.cnf ~/.my.cnf | ||
- mysql -e 'create database shiba_test;' | ||
- mysql shiba_test -e 'source test/structure.sql' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[client] | ||
user = travis | ||
password = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
require 'helper' | ||
require 'shiba/backtrace' | ||
|
||
|
||
describe "Backtrace" do | ||
|
||
it "doesn't blow up" do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'helper' | ||
require 'shiba' | ||
require 'shiba/fuzzer' | ||
|
||
describe "Connection" do | ||
|
||
it "doesn't blow up" do | ||
Shiba.configure('database' => 'shiba_test', 'default_file' => '~/.my.cnf', 'default_group' => 'client') | ||
assert_equal 'shiba_test', Shiba.connection.query("select database() as db").first["db"] | ||
|
||
stats = Shiba::Fuzzer.new(Shiba.connection).fuzz! | ||
assert stats.any?, stats.inspect | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE TABLE `users` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`organization_id` int(11) DEFAULT NULL, | ||
`email` varchar(255) NOT NULL, | ||
`name` varchar(255) DEFAULT '', | ||
`created_at` datetime NOT NULL, | ||
`updated_at` datetime(3) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `index_users_on_organization_id` (`organization_id`) | ||
); | ||
|
||
CREATE TABLE `organizations` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT '', | ||
`created_at` datetime NOT NULL, | ||
`updated_at` datetime(3) NOT NULL, | ||
PRIMARY KEY (`id`) | ||
); | ||
|
||
CREATE TABLE `comments` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`user_id` int(11) NOT NULL, | ||
`body` mediumtext NOT NULL, | ||
`created_at` datetime NOT NULL, | ||
`updated_at` datetime(3) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `index_comments_on_user_id` (`user_id`) | ||
); |