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

Make service e2e tests run in timestamped namespaces. #6125

Merged
merged 1 commit into from Mar 30, 2015
Merged

Make service e2e tests run in timestamped namespaces. #6125

merged 1 commit into from Mar 30, 2015

Conversation

ghost
Copy link

@ghost ghost commented Mar 27, 2015

Make some service e2e tests run in timestamped namespaces to prevent name collisions across multiple runs.

Shortly I'll migrate all of the tests to their own namespaces, but right now some of the break if they don't run in api.NamespaceDefault (i.e. "default"). I'll fix that in a separate PR.

@ghost ghost assigned zmerlynn Mar 27, 2015

BeforeEach(func() {
var err error
c, err = loadClient()
Expect(err).NotTo(HaveOccurred())
namespace0 = "e2e-ns-" + dateStamp() + "-0"
Copy link
Member

Choose a reason for hiding this comment

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

maybe include 'services' in the name, so we can tell where this comes from? or 'service.go' or something like that.

Copy link
Member

Choose a reason for hiding this comment

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

also, should there be a step at some point which deletes everything from these namespaces?

Copy link
Author

Choose a reason for hiding this comment

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

I had to shorten then name to prevent the concatenation of namespace and name from exceeding the 61 character limit imposed by GCE. That's essentially a bug in Kubernetes, that will have to be fixed separately. Kubernetes just concatenates them, and fils if the result exceeds the limit of the cloud provider. I suggest that we leave as is until that bug is fixed.

Copy link
Author

Choose a reason for hiding this comment

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

As for deleting the namespaces, yes, I will add some additional cleanup code in AfterEach(), but that requires a PR that derekwaynecarr@ is still working on (I believe), to allow me to delete entire namespaces.

Copy link
Author

Choose a reason for hiding this comment

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

PS: I suggest merging as is for now, and adding namespace deletion in a second pass. What we have here already is a vast improvement over the status quo. Adding namespace deletion will be a further improvement.

@ghost ghost assigned ixdy and unassigned zmerlynn Mar 28, 2015
@ixdy
Copy link
Member

ixdy commented Mar 30, 2015

LGTM - but can you please squash the two commits?

Make some service e2e tests run in timestamped namespaces to prevent name collisions.
@ghost
Copy link
Author

ghost commented Mar 30, 2015

Done (commit a4dde6). Thanks. If you could merge before the end of the day that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants