-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add integration tests #190
Conversation
7bf58b7
to
145a46b
Compare
Codecov Report
@@ Coverage Diff @@
## master #190 +/- ##
==========================================
- Coverage 90.85% 90.83% -0.02%
==========================================
Files 25 25
Lines 1410 1408 -2
==========================================
- Hits 1281 1279 -2
Misses 96 96
Partials 33 33
Continue to review full report at Codecov.
|
e3b49ad
to
930eccb
Compare
930eccb
to
956d52f
Compare
@@ -986,7 +986,6 @@ definitions: | |||
type: object | |||
required: | |||
- key | |||
- attachment |
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.
no need to be required, tested with integration tests
@@ -1060,9 +1059,6 @@ definitions: | |||
format: int64 | |||
minimum: 0 | |||
maximum: 100 | |||
bitmap: |
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.
not needed now, tested with integration tests
@@ -89,7 +89,7 @@ func (c *crud) FindFlags(params flag.FindFlagsParams) middleware.Responder { | |||
q = q.Offset(int(*params.Offset)) | |||
} | |||
|
|||
err := q.All(&fs) | |||
err := q.OrderAscByID().All(&fs) |
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.
Need to explicitly sort by ID for postgres, caught by integration tests
@@ -213,7 +213,7 @@ var evalSegment = func( | |||
Msg: fmt.Sprintf("constraints are present in the segment_id %v, but got invalid entity_context: %s.", segment.ID, spew.Sdump(evalContext.EntityContext)), | |||
SegmentID: int64(segment.ID), | |||
} | |||
return nil, log, false | |||
return nil, log, true |
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.
Caught by integration tests. We need to continue if evalContext.EntityContext
if nil or invalid, because there may be some segments below that has no constraints.
Description
Add integration tests so that we can test flagr against multiple environments or multiple DBs.
Motivation and Context
To cover DB discrepancies.
How Has This Been Tested?
Will add more endpoints covered by the swagger API definition.
Types of changes
Checklist: