-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Conversation
|
||
BeforeEach(func() { | ||
var err error | ||
c, err = loadClient() | ||
Expect(err).NotTo(HaveOccurred()) | ||
namespace0 = "e2e-ns-" + dateStamp() + "-0" |
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.
maybe include 'services' in the name, so we can tell where this comes from? or 'service.go' or something like that.
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.
also, should there be a step at some point which deletes everything from these namespaces?
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.
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.
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.
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.
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.
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.
LGTM - but can you please squash the two commits? |
Make some service e2e tests run in timestamped namespaces to prevent name collisions.
Done (commit a4dde6). Thanks. If you could merge before the end of the day that would be great. |
…amespaces Make service e2e tests run in timestamped namespaces.
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.