Commit Graph

27 Commits

Author SHA1 Message Date
Riyaz Faizullabhoy f3854dc390 Add unit tests, remove auth key, cleanup
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:05 -07:00
Riyaz Faizullabhoy 6d3b017c56 Consistent metastore walks from current timestamp to checksums of snapshot/other roles
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:02 -07:00
Ying Li 7404f4ff55 Embed SignedCommon in Root, Snapshot, and Timestamp, as it's already
embedded in Targets.  This way we can easily get a SignedCommon object
out after calling RootFromSigned, etc.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-07 17:27:13 -07:00
Ying Li e1397f4b03 Use updated-at for last modification date for getting current metadata
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li 8768c12901 Return the creation date for GetChecksum and GetCurrent from the server database store.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
David Lawrence adfbe6938e cleaning up logging
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-24 10:38:55 -08:00
David Lawrence 27961b010e negative tests for get by checksum
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-24 10:38:55 -08:00
David Lawrence 5a9e06fe5c adding sha256 column to tuf_files database table
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-11 17:31:01 -08:00
David Lawrence 38d2175087 tests for new validation code
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-16 15:06:48 -08:00
David Lawrence 064e37560e adding tests for role based key support on server
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-03 13:58:25 -08:00
David Lawrence e20773f2b1 renaming TimestampKey and ErrTimestampKeyExists to just Key and ErrKeyExists
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-03 11:25:45 -08:00
David Lawrence c2c474b9c6 generalize notary server key storage to be able to handle any role, not just timestamps
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-03 11:25:45 -08:00
David Lawrence f73560d839 creating concrete types for the various key ciphers
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-28 16:02:55 -07:00
David Lawrence 2833a88292 adding gotuf to notary
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-27 16:36:06 -07:00
Ying Li 79066c3403 Just drop the test tables when they should not exist
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 11:30:34 -07:00
Ying Li ba4e596457 Move the testing.T module to be the first argument to helper functions.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 16:19:17 -07:00
Ying Li 517dd4bbd0 Rename MySQL to SQL in server DB tests
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 11:28:57 -07:00
Ying Li df95dc4564 Add a DB health check to the server storage DB
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 11:28:14 -07:00
Ying Li 7fa991c3ff Gormizes the server database and make it SQL-DB agnostic.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 16:45:41 -07:00
Ying Li 1bb1f1acd2 Refactor server/storage models to use gorm.Model and to be in their
file.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 14:28:20 -07:00
Ying Li 01f7adc80c Document the intended behavior of each function in the storage
interface.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-10 18:44:44 -07:00
Ying Li 99cac889b1 Add some more tests for storing TUF files in the db
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-09 22:48:21 -07:00
Ying Li 5f70699937 Add more tests for UpdateCurrent
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-09 12:19:17 -07:00
Ying Li 31bb0b0525 Do more verifications on the server store DB tests using gorm
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-08 23:20:48 -07:00
Ying Li 06e21a234c Convert server/storage/database tests to use SQLite3
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-08 16:42:05 -07:00
David Lawrence 72d7d35221 fixing database queries
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-15 16:19:14 -07:00
David Lawrence 6533da1be4 tests for atomic update
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 18:19:31 -07:00