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

Migrate utils from test/kube2e to test/kubernetes #9720

Merged
merged 12 commits into from
Jul 4, 2024

Conversation

jbohanon
Copy link
Contributor

@jbohanon jbohanon commented Jul 3, 2024

Description

Migrate the util.go and helper/ from test/kube2e/ to kubernetes/testutils/helper/.

This is preliminary work to the migration of all tests out of kube2e.

A number of differences exist between the old tool and new tool:

  • TestUpstreamServer and the entire testContainer abstraction has been removed.
    • The manifest and go vars for a default nginx server serving http and https has been added, and this should be used as a drop-in replacement for the TestUpstreamServer when migrating
  • Numerous assertions were deleted. When a test using this assertion is ported, the developer doing the port should move the required code to test/kubernetes/testutils/assertions.
  • Some scaffolding for moving to install via helm directly instead of via glooctl has been added.
    • We explicitly want to NOT change the install method until all tests have been ported to reduce the number of things being changed at once and increase our confidence in the port
    • The helm install code is not presently wired all the way through yet.

I will need pull changes from @davidjumani's PR #9715 into this

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Visit the preview URL for this PR (updated for commit 6bcff40):

https://gloo-edge--pr9720-jbohanon-test-migrat-306718dd.web.app

(expires Wed, 10 Jul 2024 18:35:28 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/solo-projects/issues/6303

pkg/utils/fsutils/fsutils.go Show resolved Hide resolved
test/kubernetes/testutils/helper/docker/Dockerfile Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/install.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/install.go Outdated Show resolved Hide resolved
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

Looking good! Happy to defer to the group around migrating existing utilities vs trying to remove any legacy functionality while we're in here.

test/kube2e/helper/http_echo.go Show resolved Hide resolved
test/gomega/assertions/stats.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/assertions/glooctl.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/util.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/util.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/util.go Outdated Show resolved Hide resolved
test/kubernetes/testutils/helper/util.go Show resolved Hide resolved
@jbohanon jbohanon enabled auto-merge (squash) July 4, 2024 11:47
@jbohanon jbohanon merged commit f5f200b into main Jul 4, 2024
19 checks passed
@jbohanon jbohanon deleted the jbohanon/test-migration/utils branch July 4, 2024 11:48
soloio-bulldozer bot added a commit that referenced this pull request Jul 12, 2024
* Migrate utils from `test/kube2e` to `test/kubernetes` (#9720)

* Enhance debug info for failed kubernetes e2e tests (#9746)

* add cluster state file; print failures for each test

* add changelog

* proxy logs

* test/kube: namespaces from kubectl

* appendable files

* appendable files

* remove redundant namespace dir in fail path

* fixer uppers

* sort namespaces, use fully qualified resource names and sort them in output

---------

Co-authored-by: nfuden <nathan.fudenberg@solo.io>
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>

* fix changelogs

---------

Co-authored-by: nfuden <nathan.fudenberg@solo.io>
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants