-
Notifications
You must be signed in to change notification settings - Fork 332
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
allows for running all tests inside a container #1976
Conversation
4ecb045
to
98f6c8a
Compare
why not make this replace the |
Allows for the choice of running tests on systems where docker is not installed. However, if there is a consensus, I can implement your suggestion. |
@vjayaramrh this looks very good as is. I am going to start using this on my Macbook once this integrates. Can you please also add make, make lint, and make gofmt? @abhat as a good point. I am fine either ways not sure what @dcbw @trozet think? @aojea will it have any impact in Github's ci/cd? |
from the top of my head it shouldn't
You should keep an option for people without docker/podman installed, I think that just checking if This is really nice, so we have consistency +1 to making it the default |
@girishmg Looks like hack/lint.sh is already invoking a docker container, let me see what I can do in this PR related to |
@aojea let me see if I can do a check for docker installed and keep the same targets as suggested by @abhat |
95a4bf0
to
1608aea
Compare
1608aea
to
c1a0a3c
Compare
/lgtm |
go-controller/Makefile
Outdated
@@ -9,6 +9,12 @@ PKGS ?= | |||
GOPATH ?= $(shell go env GOPATH) | |||
TEST_REPORT_DIR?=$(CURDIR)/_artifacts | |||
export TEST_REPORT_DIR | |||
GO_DKR_IMG = golang:1.15.7-buster |
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.
nit: GO_DOCKER_IMG
instead of GO_DKR_IMG
.
Also, what is the need for a buster
image?
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 an aside, I ran into docker pull limits when pulling this image. Do we just assume that the buster image is hosted on a registry that is pullable in the env where this runs?
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.
@abhat, I am using the official go image from the docker registry, so most folks that have docker installed should be able to pull from the docker registry. Do you have any additional suggestions?
Per the snippet from the article at https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/ do you think this would be an issue?
Anonymous free users will be limited to 100 pulls per six hours, and authenticated free users will be limited to 200 pulls per six hours.
…tainer Signed-off-by: Vishwanath Jayaraman <vjayaram@redhat.com>
e36b396
to
2f9665d
Compare
Signed-off-by: Aniket Bhat <anbhat@redhat.com>
2f9665d
to
ab4130f
Compare
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.
/lgtm
Allows for running tests inside of a container using docker or podman. Signed-off-by: Vishwanath Jayaraman <vjayaram@redhat.com> Co-authored-by: Aniket Bhat <anbhat@redhat.com>
Allows for running tests inside of a container using docker or podman. Signed-off-by: Vishwanath Jayaraman <vjayaram@redhat.com> Co-authored-by: Aniket Bhat <anbhat@redhat.com> (cherry picked from commit a666cbc)
OCPBUGS-22847: Downstream merge 12-7-23
Co-authored-by: Aniket Bhat anbhat@redhat.com
Signed-off-by: Vishwanath Jayaraman vjayaram@redhat.com
- What this PR does and why is it needed
This PR adds the ability to run tests (including those requiring sudo such as tests in pkg/node and hybrid-overlay/pkg/controller) inside of a golang 1.15 docker container. Allows for running tests on non-linux systems as well.
- Special notes for reviewers
- How to verify it
Execute
make check
ormake test
on your development system that has docker installed from the ovn-kuberentes/go-controller directory.- Description for the changelog