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

Use ECR Mirror for Curl Test Image. #2956

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/framework/resources/agent/traffic_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (t *TrafficTest) startMetricServerPod() (*v1.Pod, error) {
}

func (t *TrafficTest) getTestStatusFromMetricServer(metricPodIP string) ([]input.TestStatus, error) {
getMetricContainer := manifest.NewCurlContainer().
getMetricContainer := manifest.NewCurlContainer(t.Framework.Options.TestImageRegistry).
Name("get-metric-container").
Command([]string{"curl"}).
Args([]string{fmt.Sprintf("http://%s:8080/get/metric/connectivity", metricPodIP), "--silent"}).
Expand Down
4 changes: 2 additions & 2 deletions test/framework/resources/k8s/manifest/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ func NewBusyBoxContainerBuilder(testImageRegistry string) *Container {
}
}

func NewCurlContainer() *Container {
func NewCurlContainer(testImageRegistry string) *Container {
return &Container{
name: "curl",
image: "curlimages/curl:latest",
image: utils.GetTestImage(testImageRegistry, utils.CurlImage),
imagePullPolicy: v1.PullIfNotPresent,
}
}
Expand Down
1 change: 1 addition & 0 deletions test/framework/utils/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
BusyBoxImage = "networking-e2e-test-images/busybox:latest"
NginxImage = "networking-e2e-test-images/nginx:1.25.2"
NetCatImage = "networking-e2e-test-images/netcat-openbsd:v1.0"
CurlImage = "networking-e2e-test-images/curlimages/curl:latest"

PollIntervalShort = time.Second * 2
PollIntervalMedium = time.Second * 5
Expand Down
4 changes: 2 additions & 2 deletions test/integration/cni-egress/pod_egress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ var _ = Describe("[CANARY] test cluster egress connectivity", func() {
// initialize vars
err = nil

// initialize busybox container for testing later
testerContainer = manifest.NewCurlContainer().
// initialize curl container for testing later
testerContainer = manifest.NewCurlContainer(f.Options.TestImageRegistry).
Command([]string{"sleep", "3600"}).Build()

testerContainer.SecurityContext = &coreV1.SecurityContext{
Expand Down
2 changes: 1 addition & 1 deletion test/integration/cni/pod_traffic_across_az_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var _ = Describe("[STATIC_CANARY] API Server Connectivity from AZs", FlakeAttemp

JustBeforeEach(func() {
serverContainer := manifest.
NewCurlContainer().
NewCurlContainer(f.Options.TestImageRegistry).
Command([]string{
"sleep",
"3600",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/ipamd/introspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var _ = Describe("test Environment Variables for IPAMD Introspection ", func() {
JustBeforeEach(func() {

// Initially the host networking job pod should succeed
curlContainer = manifest.NewCurlContainer().
curlContainer = manifest.NewCurlContainer(f.Options.TestImageRegistry).
Command([]string{"curl"}).
Args([]string{"--fail", defaultIntrospectionAddr}).
Build()
Expand Down
2 changes: 1 addition & 1 deletion test/integration/ipamd/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var _ = Describe("test IPAMD metric environment variable", func() {
Context("when metrics is disabled", func() {
metricAddr := "127.0.0.1:61678/metrics"
It("should not be accessible anymore", func() {
curlContainer = manifest.NewCurlContainer().
curlContainer = manifest.NewCurlContainer(f.Options.TestImageRegistry).
Command([]string{"curl"}).
Args([]string{"--fail", metricAddr}).
Build()
Expand Down
2 changes: 1 addition & 1 deletion test/integration/pod-eni/security_group_per_pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var _ = Describe("Security Group for Pods Test", func() {
ContainerPort: 80,
}

container := manifest.NewCurlContainer().
container := manifest.NewCurlContainer(f.Options.TestImageRegistry).
LivenessProbe(tcpProbe).
Image("nginx").
Port(port).
Expand Down
Loading