Unverified Commit 99fab84c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #67100 from mkurylec/promotion-lifecycle-hook-to-conformance

Automatic merge from submit-queue (batch tested with PRs 67100, 67426). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. porting e2e_node lifecycle testcases into e2e folder under common a) Shifted (and renamed) file existing in e2e_node to e2e/common. b) Added these tests to the conformance suite: - "should execute poststart exec hook properly" - "should execute prestop exec hook properly" - "should execute poststart http hook properly" - "should execute prestop http hook properly" [reference issue](https://github.com/kubernetes/kubernetes/issues/67086) explaining the effort.
parents b8efc418 95a6dc4f
......@@ -93,6 +93,10 @@ test/e2e/common/init_container.go: "should invoke init containers on a RestartAl
test/e2e/common/init_container.go: "should not start app containers if init containers fail on a RestartAlways pod"
test/e2e/common/init_container.go: "should not start app containers and fail the pod if init containers fail on a RestartNever pod"
test/e2e/common/kubelet_etc_hosts.go: "should test kubelet managed /etc/hosts file"
test/e2e/common/lifecycle_hook.go: "should execute poststart exec hook properly"
test/e2e/common/lifecycle_hook.go: "should execute prestop exec hook properly"
test/e2e/common/lifecycle_hook.go: "should execute poststart http hook properly"
test/e2e/common/lifecycle_hook.go: "should execute prestop http hook properly"
test/e2e/common/networking.go: "should function for intra-pod communication: http"
test/e2e/common/networking.go: "should function for intra-pod communication: udp"
test/e2e/common/networking.go: "should function for node-pod communication: http"
......
......@@ -22,6 +22,7 @@ go_library(
"host_path.go",
"init_container.go",
"kubelet_etc_hosts.go",
"lifecycle_hook.go",
"networking.go",
"pods.go",
"privileged.go",
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e_node
package common
import (
"time"
......@@ -89,7 +89,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
Testname: Pod Lifecycle, post start exec hook
Description: When a post start handler is specified in the container lifecycle using a ‘Exec’ action, then the handler MUST be invoked after the start of the container. A server pod is created that will serve http requests, create a second pod with a container lifecycle specifying a post start that invokes the server pod using ExecAction to validate that the post start is executed.
*/
It("should execute poststart exec hook properly [NodeConformance]", func() {
framework.ConformanceIt("should execute poststart exec hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{
PostStart: &v1.Handler{
Exec: &v1.ExecAction{
......@@ -105,7 +105,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
Testname: Pod Lifecycle, prestop exec hook
Description: When a pre-stop handler is specified in the container lifecycle using a ‘Exec’ action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve http requests, create a second pod with a container lifecycle specifying a pre-stop that invokes the server pod using ExecAction to validate that the pre-stop is executed.
*/
It("should execute prestop exec hook properly [NodeConformance]", func() {
framework.ConformanceIt("should execute prestop exec hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{
PreStop: &v1.Handler{
Exec: &v1.ExecAction{
......@@ -121,7 +121,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
Testname: Pod Lifecycle, post start http hook
Description: When a post start handler is specified in the container lifecycle using a HttpGet action, then the handler MUST be invoked after the start of the container. A server pod is created that will serve http requests, create a second pod with a container lifecycle specifying a post start that invokes the server pod to validate that the post start is executed.
*/
It("should execute poststart http hook properly [NodeConformance]", func() {
framework.ConformanceIt("should execute poststart http hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{
PostStart: &v1.Handler{
HTTPGet: &v1.HTTPGetAction{
......@@ -139,7 +139,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
Testname: Pod Lifecycle, prestop http hook
Description: When a pre-stop handler is specified in the container lifecycle using a ‘HttpGet’ action, then the handler MUST be invoked before the container is terminated. A server pod is created that will serve http requests, create a second pod with a container lifecycle specifying a pre-stop that invokes the server pod to validate that the pre-stop is executed.
*/
It("should execute prestop http hook properly [NodeConformance]", func() {
framework.ConformanceIt("should execute prestop http hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{
PreStop: &v1.Handler{
HTTPGet: &v1.HTTPGetAction{
......
......@@ -93,7 +93,6 @@ go_test(
"hugepages_test.go",
"image_id_test.go",
"kubelet_test.go",
"lifecycle_hook_test.go",
"log_path_test.go",
"mirror_pod_test.go",
"node_container_manager_test.go",
......@@ -137,7 +136,6 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment