Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bosh unit test failed with non matching SQL error message #7

Open
weilanwu opened this issue Jul 2, 2014 · 1 comment
Open

bosh unit test failed with non matching SQL error message #7

weilanwu opened this issue Jul 2, 2014 · 1 comment

Comments

@weilanwu
Copy link

weilanwu commented Jul 2, 2014

bundle exec rake :
...

  1) Bosh::Director::Models::DirectorAttribute validations does not allow attribute with name if one is already found via database (DB uniqueness is important since we rely that only one uuid is used by the director)
     Failure/Error: Unable to find matching line from backtrace
       expected Sequel::DatabaseError with message matching /column name is not unique/, got #<Sequel::DatabaseError: SQLite3::ConstraintException: UNIQUE constraint failed: director_attributes.name> with backtrace:
         # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:112:in `block (4 levels) in '
         # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:111:in `block (3 levels) in '
     # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:111:in `block (3 levels) in '

Basically the code looks for '/column name is not unique/', but the output from DB is:
'#<Sequel::DatabaseError: SQLite3::ConstraintException: UNIQUE constraint failed: director_attributes.name>'

@dengwa
Copy link

dengwa commented Jul 3, 2014

This shouldn’t be caused by your code change. Please check other CI run on travis and see if they have the same issue.

Weian

From: weilanwu [mailto:[email protected]]
Sent: 2014年7月2日 16:58
To: HuaweiTech/bosh
Subject: [bosh] bosh unit test failed with non matching SQL error message (#7)

bundle exec rake :
...

  1. Bosh::Director::Models::DirectorAttribute validations does not allow attribute with name if one is already found via database (DB uniqueness is important since we rely that only one uuid is used by the director)
 Failure/Error: Unable to find matching line from backtrace

   expected Sequel::DatabaseError with message matching /column name is not unique/, got #<Sequel::DatabaseError: SQLite3::ConstraintException: UNIQUE constraint failed: director_attributes.name> with backtrace:

     # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:112:in `block (4 levels) in '

     # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:111:in `block (3 levels) in '

 # ./bosh/bosh-director/spec/unit/models/director_attribute_spec.rb:111:in `block (3 levels) in '

Basically the code looks for '/column name is not unique/', but the output from DB is:
'#<Sequel::DatabaseError: SQLite3::ConstraintException: UNIQUE constraint failed: director_attributes.name>'


Reply to this email directly or view it on GitHubhttps://github.com//issues/7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants