This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Add controller interface for directories #17
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #17 +/- ##
==========================================
+ Coverage 87.98% 93.33% +5.35%
==========================================
Files 4 3 -1
Lines 466 225 -241
==========================================
- Hits 410 210 -200
+ Misses 47 11 -36
+ Partials 9 4 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
efedb7a
to
6e0a2f6
Compare
This creates constructs for applications to simply instantiate a controller which will ensure that directories are up-to-date and persistent in a local database. It also listens for events from an event-queue and calls the reconcile function respectively. The reconcile function is left as an interface, as reconciliation is application specific. e.g. we don't know what users will do with a directory change, but we want to make sure they know what to do. Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
They're really integration tests and we should do more minimal unit testing for the tree manager instead. Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
This is a simple test that merely verifies that the reconcile loop ran on initialization. Based on this test, this commit also fixes all issues found from testing. Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
We had a double-reconcile issue when notifications happened. Normally, double reconciles are not a problem, but we do have a stateful application since we rely on event tracking for testing. This test now covers most of the functionality for the application Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
Goose is not thread safe... so, to deal with this, we globally lock the goose migration code for the test utils. Also, we do locking for the integration tests since those tests actually use two schemas. This only affects testing code. Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This creates constructs for applications to simply instantiate a
controller which will ensure that directories are up-to-date and
persistent in a local database. It also listens for events from an
event-queue and calls the reconcile function respectively.
The reconcile function is left as an interface, as reconciliation is
application specific. e.g. we don't know what users will do with a
directory change, but we want to make sure they know what to do.
Remaining
Signed-off-by: Juan Antonio Osorio juan.osoriorobles@eu.equinix.com