-
Notifications
You must be signed in to change notification settings - Fork 73
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 test for different deployments #64
Conversation
89ded28
to
6081d4f
Compare
Should tests that contain multiple deployments at the same time be added here? |
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 comments, mostly because of changes in master.
tests/deployments_test.go
Outdated
|
||
// Prepare deployment config | ||
deploymentTemplate := newDeployment("test-1-deployment-" + string(mode) + "-" + string(engine) + "-" + uniuri.NewLen(4)) | ||
deploymentTemplate.Spec.Mode = mode |
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.
Please merge in master.
After that, this code will no longer compile since Mode
& StorageEngine
are now references.
Fix it like this:
deploymentTemplate.Spec.Mode = api.NewMode(mode)
deploymentTemplate.Spec.StorageEngine = api.NewStorageEngine(engine)
tests/deployments_test.go
Outdated
|
||
k8sNameSpace := getNamespace(t) | ||
k8sClient := mustNewKubeClient(t) | ||
deploymentClient := kubeArangoClient.MustNewInCluster() // |
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.
// without comment
either remove or fill in comment
tests/deployments_test.go
Outdated
DBClient := mustNewArangodDatabaseClient(ctx, k8sClient, deployment, t) | ||
|
||
// deployment checks | ||
if deployment.Spec.Mode == api.DeploymentModeCluster { |
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.
After master merge, change deployment.Spec.Mode
to deployment.Spec.GetMode()
tests/deployments_test.go
Outdated
}); err != nil { | ||
t.Fatalf("Cluster not running in expected health in time: %v", err) | ||
} | ||
} else if deployment.Spec.Mode == api.DeploymentModeSingle { |
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.
Same here
tests/deployments_test.go
Outdated
t.Fatalf("Single Server not running in time: %v", err) | ||
} | ||
} else { | ||
t.Fatalf("DeploymentMode %v is not supported!", deployment.Spec.Mode) |
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.
Same here
tests/deployments_test.go
Outdated
|
||
// environements: provided from outside | ||
|
||
func TestDeploymentSingleMMFiles(t *testing.T) { |
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.
All exported functions must have a comment.
For test functions, explain what the test is intended to test.
This could be "// TestDeploymentSingleMMFiles tests the successful creation of a deployment of a single server with mmfiles storage engine"
76f42c2
to
6ee0b23
Compare
No description provided.