-
Notifications
You must be signed in to change notification settings - Fork 511
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
Set rethink and mysql server DB storage tests to run on circle #824
Conversation
e2e85d3
to
ffdc5d2
Compare
120869a
to
c801293
Compare
b47ce44
to
a34a946
Compare
@@ -130,16 +130,13 @@ test: | |||
@echo | |||
go test -tags "${NOTARY_BUILDTAGS}" $(TESTOPTS) $(PKGS) | |||
|
|||
test-full: TESTOPTS = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for removing this target? Admittedly, I don't use it much because it doesn't include fmt
and misspell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason is because CI doesn't use it, and doesn't have the full linting. I can just add those, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(also, someone could just do make vet lint test
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I'm fine with either removing it or bringing it in parity with circle. Agree that the current version isn't particularly useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combined all the lint functionality into one function, as per #830 (comment)
# misspell target, don't include Godeps, binaries, python tests, or git files | ||
misspell: | ||
@echo "+ $@" | ||
# mispell - requires that the following be run first: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: misspell
ea97efd
to
f9caac5
Compare
counter := make(map[string]int) | ||
for _, tufObj := range expected { | ||
k := entryKey(tufObj.Gun, tufObj.Role) | ||
gun, ok := s.tufMeta[k] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename this to gunList
or versionList
for clarity?
985502d
to
52a51ac
Compare
LGTM! Thank you for all of your work on this :) |
@@ -0,0 +1,27 @@ | |||
// +build !mysqldb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also include !rethinkdb
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately sqldb_tests
has some sample config generation that's needed by tuf_store_test
, which didn't get refactored in this PR. I plan on doing that in the next PR.
That's why sqlite3
is still needed because without that refactor, the rethinkdb tests still run the tuf_store_test
, which depends on stuff in sqldb_test
.
Seems a little odd/confusing that the sqlite tests will not run if the mysql tests are run, but will run with the rethinkdb tests. Seems like they should either always run, or have their own build flag (rather than being Other than that, LGTM. |
@endophage I am fixing that in the next PR - I needed to refactor some other tests in order to fix so me dependencies in I'm planning on : no flags, sqlite3 tests run. mysqldb flag - mysql tests run. rethinkdb - rethink tests run. Does that sound right? |
Signed-off-by: Ying Li <ying.li@docker.com>
…eal MySQL server too Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: Ying Li <ying.li@docker.com>
…ap test. Signed-off-by: Ying Li <ying.li@docker.com>
…o they can be applied to rethink. This also fixes the following bugs: 1. MemStorage's UpdateMany previously did a partial update even if there was a conflict. Now we check for conflicts before updating. 2. MemStorage's UpdateMany allowed you to insert the same version twice. 3. RethinkDB's UpdateMany does a partial update even if there was a conflict, because the deletion criteria value (for timestamp_checksum) was passed as a list not as strings. 4. RethinkDB's delete did not actually delete metadata, because the deletion criteria value (for gun) was passed as a list and not as strings. Signed-off-by: Ying Li <ying.li@docker.com>
…ion test are separate. Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: Ying Li <ying.li@docker.com>
…d old metadata is no longer current. Also rename a variable to be more clear, and make invalid arguments to the integration/testdb scripts fail faster. Signed-off-by: Ying Li <ying.li@docker.com>
@cyli sounds perfect! Merging |
Part of #797
This adds some basic rethinkDB TUF CRUD tests, and fixes the following issues:
MemStorage
'sUpdateMany
previously did a partial update even if there was a conflict. Now we check for conflicts before updating.MemStorage
'sUpdateMany
allowed you to insert the same version twice.RethinkDB
'sUpdateMany
did a partial update even if there was a conflict, because the deletion criteria value (for timestamp_checksum) was passed as a list not as strings.RethinkDB
'sDelete
did not actually delete metadata, because the deletion criteria value(for gun) was passed as a list and not as strings.
This PR:
One or more future PRs will factor out tests for
NewTUFMetaStorage
to be db-testable, and do the same for the signer tests.