-
Notifications
You must be signed in to change notification settings - Fork 74
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
Tests/multi deployment #89
Conversation
0d5e171
to
2d32098
Compare
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.
Like the test, for additional safety please add the tests as described in the comment.
tests/deployments_test.go
Outdated
if err := waitUntilArangoDeploymentHealthy(deployment2, DBClient2, k8sClient, ""); err != nil { | ||
t.Fatalf("Deployment not healthy in time: %v", err) | ||
} | ||
|
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.
To make sure that we can talk to individual deployments, I'll like to see an additional test here.
- Create a collection in deployment 1 (named
col1
) - Create a collection in deployment 2 (named
col2
) - Check that deployment 1 has a collection named
col1
but notcol2
- Check that deployment 2 has a collection named
col2
but notcol1
a45ab4c
to
2b3239d
Compare
d31745b
to
71e7e61
Compare
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.
Couple of comment issues
tests/deployments_test.go
Outdated
_, err = deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate2) | ||
assert.NoError(t, err, fmt.Sprintf("Deployment creation failed: %v", err)) | ||
|
||
// Wait for deployment to be ready |
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.
deployment -> deployments
tests/deployments_test.go
Outdated
deployment2, err := waitUntilDeployment(deploymentClient, deploymentTemplate2.GetName(), k8sNameSpace, deploymentIsReady()) | ||
assert.NoError(t, err, fmt.Sprintf("Deployment not running in time: %v", err)) | ||
|
||
// Create a database client |
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.
client -> clients
tests/deployments_test.go
Outdated
DBClient2 := mustNewArangodDatabaseClient(ctx, k8sClient, deployment2, t) | ||
assert.NoError(t, waitUntilArangoDeploymentHealthy(deployment1, DBClient1, k8sClient, ""), fmt.Sprintf("Deployment not healthy in time: %v", err)) | ||
|
||
db1, err := DBClient1.Database(ctx, "_system") |
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.
Add a comment here to explain what the intent of line 144 - 152 is
tests/deployments_test.go
Outdated
_, err = db2.CreateCollection(ctx, "col2", nil) | ||
assert.NoError(t, err, "failed to create collection") | ||
|
||
collections1, err := db1.Collections(ctx) |
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.
This is where the "real test" starts, please add a comment explaining what is being checked
* origin/master: (43 commits) Disabled colorizing logs Persistent... Only remove namespace in cleanup phase Collecting logs in script Using panic safe resource watcher Ignore errors in `kubelet logs` Adding panic-safe ResourceWatcher Archive log files Prevent panic on duplicate Delete (storage) Prevent panic on duplicate Delete avoid ' ArangoDB operator -> ArangoDB Kubernetes Operator Follow file name conventions of main docs, move to Tutorials Fixed link Moved directory structure wrt docs Quickly fail when deployment no longer exists Renamed all enum values to title case Doc file rename Fixed build Typos ...
No description provided.