-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix failed tests are depends on external container images #5328
Merged
k8s-ci-robot
merged 4 commits into
kubernetes-sigs:master
from
koba1t:fix/failed_tests_are_depends_on_external_container_images
Nov 1, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2bff0d6
fix failure tests that are running for external container image
koba1t 67a0b43
fix failed tests for testing fn framework about get value from env
koba1t 7af4e77
fix failed tests for fn framework generator
koba1t af7c088
fix failed tests for fn framework mount generator
koba1t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM golang:1.20-bullseye | ||
ENV CGO_ENABLED=0 | ||
WORKDIR /go/src/ | ||
|
||
# download modules | ||
# COPY go.mod go.mod | ||
# COPY go.sum go.sum | ||
# RUN go mod download | ||
|
||
COPY . . | ||
RUN go build -v -o /usr/local/bin/function ./cmd/config/internal/commands/e2e/e2econtainerenvgenerator | ||
|
||
FROM alpine:latest | ||
COPY --from=0 /usr/local/bin/function /usr/local/bin/function | ||
CMD ["function"] |
9 changes: 9 additions & 0 deletions
9
cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include ../../../../../../Makefile-modules.mk | ||
|
||
.PHONY: image | ||
image: | ||
docker build . -t gcr.io/kustomize-functions/e2econtainerenvgenerator | ||
docker push gcr.io/kustomize-functions/e2econtainerenvgenerator |
6 changes: 6 additions & 0 deletions
6
cmd/config/internal/commands/e2e/e2econtainerenvgenerator/doc.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright 2019 The Kubernetes Authors. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Package main contains a function to be used for e2e testing. | ||
// See https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md | ||
package main |
34 changes: 34 additions & 0 deletions
34
cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e/e2econtainerenvgenerator | ||
|
||
go 1.20 | ||
|
||
require sigs.k8s.io/kustomize/kyaml v0.14.2 | ||
|
||
require ( | ||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/go-errors/errors v1.4.2 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/go-cmp v0.5.9 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect | ||
github.com/spf13/cobra v1.7.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/xlab/treeprint v1.2.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 // indirect | ||
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) | ||
|
||
replace sigs.k8s.io/kustomize/kyaml => ../../../../../../kyaml |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@koba1t Could you elaborate on why we need a separate go mod file and repo for e2e testing? I'm sorry if the question sounds trivial, but I'm still trying to catch up. The issue states:
but I'm just wondering if we need to init a separate repo for just for e2e. And if its just for building the container image, why do we need to do it specifically inside this directory?
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.
Hi @varshaprasad96
Thanks for your comment.
I think we need any container images when testing the KRM container function. And, I think we need separate modules because we need to build small images in tests.
I'm just putting the same directory on the source of previous e2e tests container image.
If you need any ideas to improve these tests, Could you tell me that?
I want to know your advice and improve this code!