Bumped up the version of MariaDB on Travis.
Replaced a couple of expects with expectNilErrs so we don't lose the original errors messages in those tests. Fixed a couple more MySQL default value issues.
This commit is contained in:
parent
644bba36e3
commit
ebbfa7d247
|
@ -23,4 +23,4 @@ script: ./run-linux-tests
|
|||
after_script:
|
||||
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
mariadb: '10.1'
|
|
@ -690,10 +690,8 @@ func TestProfileReplyStore(t *testing.T) {
|
|||
|
||||
_, err := common.Prstore.Get(-1)
|
||||
recordMustNotExist(t, err, "PRID #-1 shouldn't exist")
|
||||
|
||||
_, err = common.Prstore.Get(0)
|
||||
recordMustNotExist(t, err, "PRID #0 shouldn't exist")
|
||||
|
||||
_, err = common.Prstore.Get(1)
|
||||
recordMustNotExist(t, err, "PRID #1 shouldn't exist")
|
||||
|
||||
|
@ -704,11 +702,11 @@ func TestProfileReplyStore(t *testing.T) {
|
|||
|
||||
var profileID = 1
|
||||
prid, err := common.Prstore.Create(profileID, "Haha", 1, "::1")
|
||||
expect(t, err == nil, "Unable to create a profile reply")
|
||||
expectNilErr(t, err)
|
||||
expect(t, prid == 1, "The first profile reply should have an ID of 1")
|
||||
|
||||
profileReply, err := common.Prstore.Get(1)
|
||||
expect(t, err == nil, "PRID #1 should exist")
|
||||
expectNilErr(t, err)
|
||||
expect(t, profileReply.ID == 1, fmt.Sprintf("The profile reply should have an ID of 1 not %d", profileReply.ID))
|
||||
expect(t, profileReply.ParentID == 1, fmt.Sprintf("The parent ID of the profile reply should be 1 not %d", profileReply.ParentID))
|
||||
expect(t, profileReply.Content == "Haha", fmt.Sprintf("The profile reply's contents should be 'Haha' not '%s'", profileReply.Content))
|
||||
|
|
|
@ -319,8 +319,8 @@ func createTables(adapter qgen.Adapter) error {
|
|||
qgen.DBTableColumn{"parsed_content", "text", 0, false, false, ""},
|
||||
qgen.DBTableColumn{"createdAt", "createdAt", 0, false, false, ""},
|
||||
qgen.DBTableColumn{"createdBy", "int", 0, false, false, ""}, // TODO: Make this a foreign key
|
||||
qgen.DBTableColumn{"lastEdit", "int", 0, false, false, ""},
|
||||
qgen.DBTableColumn{"lastEditBy", "int", 0, false, false, ""},
|
||||
qgen.DBTableColumn{"lastEdit", "int", 0, false, false, "0"},
|
||||
qgen.DBTableColumn{"lastEditBy", "int", 0, false, false, "0"},
|
||||
qgen.DBTableColumn{"ipaddress", "varchar", 200, false, false, "0.0.0.0.0"},
|
||||
},
|
||||
[]qgen.DBTableKey{
|
||||
|
|
Loading…
Reference in New Issue