Skip to content
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

Merged
merged 8 commits into from
Apr 5, 2018
Merged

Tests/multi deployment #89

merged 8 commits into from
Apr 5, 2018

Conversation

ObiWahn
Copy link
Contributor

@ObiWahn ObiWahn commented Mar 28, 2018

No description provided.

@ObiWahn ObiWahn added the 9 WIP label Mar 28, 2018
@ObiWahn ObiWahn requested a review from ewoutp March 28, 2018 11:55
@ObiWahn ObiWahn force-pushed the tests/multi-deployment branch 3 times, most recently from 0d5e171 to 2d32098 Compare March 28, 2018 12:29
Copy link
Contributor

@ewoutp ewoutp left a 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.

if err := waitUntilArangoDeploymentHealthy(deployment2, DBClient2, k8sClient, ""); err != nil {
t.Fatalf("Deployment not healthy in time: %v", err)
}

Copy link
Contributor

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 not col2
  • Check that deployment 2 has a collection named col2 but not col1

@ObiWahn ObiWahn force-pushed the tests/multi-deployment branch 2 times, most recently from a45ab4c to 2b3239d Compare March 29, 2018 12:59
@ObiWahn ObiWahn force-pushed the tests/multi-deployment branch from d31745b to 71e7e61 Compare March 29, 2018 17:18
Copy link
Contributor

@ewoutp ewoutp left a 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

_, err = deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate2)
assert.NoError(t, err, fmt.Sprintf("Deployment creation failed: %v", err))

// Wait for deployment to be ready
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployment -> deployments

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client -> clients

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")
Copy link
Contributor

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

_, err = db2.CreateCollection(ctx, "col2", nil)
assert.NoError(t, err, "failed to create collection")

collections1, err := db1.Collections(ctx)
Copy link
Contributor

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

ObiWahn and others added 5 commits April 5, 2018 13:29
* 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
  ...
@ewoutp ewoutp merged commit 163845d into master Apr 5, 2018
@ewoutp ewoutp deleted the tests/multi-deployment branch April 5, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants