Skip to content

Conversation

@smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Nov 9, 2018

Executing e2e tests under ginkgo is hard to explain and use. Create a new top level command openshift-tests that focuses on four key improvements:

  1. Focus on end user interaction - one command, a subcommand with help and minimal arguments
  2. Provide simpler and more concrete status update as tests are being run (ginkgo makes it too difficult to see what tests are running and progress)
  3. Provide a better dry-run mode to see what tests are going to be executed
  4. Replace the use of regexps with simple suites. Allow clever filtering using the --dry-run output for a suite and the -f - input to suite run.

This command will be the primary interaction method for CI and end user test function. We will remove and deprecate all older suites as we go.

This commit does not attempt to simplify suite assignment - that will be reserved for a future change.

$ openshift-tests -h
OpenShift Tests

Usage:
   [command]

Available Commands:
  help        Help about any command
  run         Run a test suite
  run-test    Run a single test by name

$ openshift-tests run -h
Run a test suite against an OpenShift serverAvailable test suites:

openshift/conformance
  Tests that ensure an OpenShift cluster and components are working properly.

openshift/conformance/parallel
  Only the portion of the openshift/conformance test suite that run in parallel.

openshift/conformance/serial
  Only the portion of the openshift/conformance test suite that run serially.

kubernetes/conformance
  The default Kubernetes conformance suite.

openshift/build
  Tests that exercise the OpenShift build functionality.

openshift/image-registry
  Tests that exercise the OpenShift image-registry functionality.

openshift/all
  Run all tests.

kubernetes/all
  Run all Kubernetes tests.

Usage:
   run SUITE [flags]

Flags:
      --dry-run              Print the tests to run without executing them.
  -f, --file string          Create a suite from the newline-delimited test names in this file.
  -h, --help                 help for run
      --junit-dir string     The directory to write test reports to.
  -o, --output-file string   Write all test output to this file.
      --provider string      The cluster infrastructure provider. Will automatically default to the correct value.

$ openshift-tests run openshift/conformance --junit-dir /tmp/artifacts/test -o /tmp/log --provider '{"type":"gce","projectid":"openshift-gce-devel","zone":"us-east1-c"}'
started: (0/1/615) "[sig-service-catalog] [Feature:PodPreset] PodPreset should not modify the pod on conflict [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/2/615) "[sig-cli] Kubectl client [k8s.io] Update Demo should create and stop a replication controller  [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/3/615) "[sig-service-catalog] [Feature:PodPreset] PodPreset should create a pod preset [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/4/615) "[sig-storage] PersistentVolumes-local  [Volume type: dir-link] One pod requesting one prebound PVC should be able to mount volume and read from pod1 [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/5/615) "[sig-storage] Projected should provide podname only [NodeConformance] [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/6/615) "[sig-storage] Projected should be able to mount in a volume regardless of a different secret existing with same name in different namespace [NodeConformance] [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/7/615) "[sig-storage] ConfigMap binary data should be reflected in volume [NodeConformance] [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/8/615) "[sig-storage] ConfigMap should be consumable from pods in volume with mappings and Item mode set [NodeConformance] [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/9/615) "[sig-apps] ReplicaSet should serve a basic image on each replica with a public image  [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/10/615) "[sig-auth] [Feature:NodeAuthorizer] Getting an existing configmap should exit with the Forbidden error [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/11/615) "[Conformance][templates] templateinstance impersonation tests should pass impersonation update tests [Suite:openshift/conformance/parallel/minimal]"

started: (0/12/615) "[sig-storage] Dynamic Provisioning DynamicProvisioner should test that deleting a claim before the volume is provisioned deletes the volume. [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/13/615) "[Area:Networking] network isolation when using a plugin that does not isolate namespaces by default should allow communication between pods in different namespaces on the same node [Suite:openshift/conformance/parallel]"

started: (0/14/615) "[sig-storage] Volume Placement should create and delete pod with multiple volumes from same datastore [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/15/615) "[sig-storage] Projected should provide node allocatable (memory) as default memory limit if the limit is not set [NodeConformance] [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/16/615) "[sig-cli] Kubectl client [k8s.io] Kubectl describe should check if kubectl describe prints relevant information for rc and pods  [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/17/615) "[sig-storage] Projected should be consumable from pods in volume with mappings as non-root [NodeConformance] [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/18/615) "[sig-storage] Ephemeralstorage When pod refers to non-existent ephemeral storage should allow deletion of pod with invalid volume : configmap [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/19/615) "[Feature:DeploymentConfig] deploymentconfigs keep the deployer pod invariant valid [Conformance] should deal with cancellation after deployer pod succeeded [Suite:openshift/conformance/parallel/minimal]"

started: (0/20/615) "[sig-auth] PodSecurityPolicy should enforce the restricted policy.PodSecurityPolicy [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/21/615) "[Feature:Builds][Conformance][valueFrom] process valueFrom in build strategy environment variables  should successfully resolve valueFrom in s2i build environment variables [Suite:openshift/conformance/parallel/minimal]"

started: (0/22/615) "[Area:Networking] network isolation when using a plugin that isolates namespaces by default should allow communication from non-default to default namespace on the same node [Suite:openshift/conformance/parallel]"

started: (0/23/615) "[sig-storage] GCP Volumes NFSv4 should be mountable for NFSv4 [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/24/615) "[sig-network] Proxy version v1 should proxy through a service and a pod  [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

started: (0/25/615) "[sig-api-machinery] Servers with support for Table transformation should return a 406 for a backend which does not implement metadata [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/26/615) "[sig-storage] Subpath [Volume type: nfsPVC] should support non-existent path [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/27/615) "[sig-auth] [Feature:NodeAuthorizer] Getting a non-existent secret should exit with the Forbidden error, not a NotFound error [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/28/615) "[sig-storage] EmptyDir volumes when FSGroup is specified [NodeFeature:FSGroup] new files should be created with FSGroup ownership when container is root [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/29/615) "[sig-cli] Kubectl client [k8s.io] Kubectl run CronJob should create a CronJob [Suite:openshift/conformance/parallel] [Suite:k8s]"

started: (0/30/615) "[sig-cli] Kubectl client [k8s.io] Kubectl rolling-update should support rolling-update to same image  [Conformance] [Suite:openshift/conformance/parallel/minimal] [Suite:k8s]"

Nov  9 01:11:50.115: INFO: Fetching cloud provider for "gce"
I1109 01:11:50.116394    4304 gce.go:844] Using DefaultTokenSource &oauth2.reuseTokenSource{new:jwt.jwtSource{ctx:(*context.emptyCtx)(0xc000052080), conf:(*jwt.Config)(0xc000852100)}, mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(nil)}
I1109 01:11:51.220038    4304 gce.go:844] Using DefaultTokenSource &oauth2.reuseTokenSource{new:jwt.jwtSource{ctx:(*context.emptyCtx)(0xc000052080), conf:(*jwt.Config)(0xc00027b680)}, mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(nil)}
I1109 01:11:51.393556    4304 gce.go:844] Using DefaultTokenSource &oauth2.reuseTokenSource{new:jwt.jwtSource{ctx:(*context.emptyCtx)(0xc000052080), conf:(*jwt.Config)(0xc000852200)}, mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(nil)}
W1109 01:11:51.493474    4304 gce.go:443] No network name or URL specified.
Nov  9 01:11:53.997: INFO: lookupDiskImageSources: gcloud error with [[]string{"instance-groups", "list-instances", "", "--format=get(instance)"}]; err:exit status 1
Nov  9 01:11:53.997: INFO:  > ERROR: (gcloud.compute.instance-groups.list-instances) could not parse resource []
Nov  9 01:11:53.997: INFO:  >
Nov  9 01:11:53.997: INFO: Cluster image sources lookup failed: exit status 1

Nov  9 01:11:53.997: INFO: >>> kubeConfig: /tmp/admin.kubeconfig
Nov  9 01:11:54.001: INFO: Waiting up to 30m0s for all (but 0) nodes to be schedulable
Nov  9 01:11:54.237: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Nov  9 01:11:54.352: INFO: 3 / 3 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Nov  9 01:11:54.352: INFO: expected 0 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Nov  9 01:11:54.385: INFO: Waiting for pods to enter Success, but no pods in "kube-system" match label map[name:e2e-image-puller]
Nov  9 01:11:54.385: INFO: Dumping network health container logs from all nodes...
Nov  9 01:11:54.420: INFO: e2e test version: v1.11.0+d4cacc0
Nov  9 01:11:54.448: INFO: kube-apiserver version: v1.11.0+d4cacc0
[BeforeEach] [Top Level]
  /Users/clayton/projects/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/test/extended/util/test.go:62
[BeforeEach] when using a plugin that isolates namespaces by default
  /Users/clayton/projects/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/test/extended/networking/util.go:419
Nov  9 01:11:55.406: INFO: This plugin does not isolate namespaces by default.
[AfterEach] when using a plugin that isolates namespaces by default
  /Users/clayton/projects/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go:142
Nov  9 01:11:55.407: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
[AfterEach] when using a plugin that isolates namespaces by default
  /Users/clayton/projects/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go:142
Nov  9 01:11:55.407: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
Nov  9 01:11:55.409: INFO: Running AfterSuite actions on all node
Nov  9 01:11:55.409: INFO: Running AfterSuite actions on node 1
Nov  9 01:11:55.406: This plugin does not isolate namespaces by default.

skipped: (9.6s) "[Area:Networking] network isolation when using a plugin that isolates namespaces by default should allow communication from non-default to default namespace on the same node [Suite:openshift/conformance/parallel]"

started: (0/31/615) "[Conformance][Area:Networking][Feature:Router] The HAProxy router should respond with 503 to unrecognized hosts [Suite:openshift/conformance/parallel/minimal]"

TODO:

  • move vendor changes to upstreams
  • prepare upstream jobs for starting to run this binary

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 9, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2018
@smarterclayton smarterclayton force-pushed the extended_binary branch 2 times, most recently from 854716c to 415a8b1 Compare November 9, 2018 17:45
@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton force-pushed the extended_binary branch 2 times, most recently from b8387f2 to 566dd93 Compare November 12, 2018 00:09
@smarterclayton smarterclayton force-pushed the extended_binary branch 3 times, most recently from d9955b7 to 8bc3422 Compare November 12, 2018 05:28
@danwinship danwinship removed their request for review November 12, 2018 14:58
@smarterclayton smarterclayton force-pushed the extended_binary branch 3 times, most recently from 429f08e to b2b60aa Compare November 12, 2018 22:51
@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

/test e2e-aws

@smarterclayton smarterclayton force-pushed the extended_binary branch 2 times, most recently from 55b712c to aae61b9 Compare November 13, 2018 16:07
@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton changed the title WIP: tests: Create a new test binary that can be used instead of extended.tests tests: Create a new test binary that can be used instead of extended.tests Nov 13, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2018
@smarterclayton
Copy link
Contributor Author

/retest

1 similar comment
@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2018
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2018
@smarterclayton
Copy link
Contributor Author

/retest

…y-run

This is fixed in 1.12 so the commit can safely be dropped.
…tests

Executing e2e tests under ginkgo is hard to explain and use. Create a new
top level command `openshift-tests` that focuses on four key improvements:

1. Focus on end user interaction - one command, a subcommand with help,
   and minimal arguments
2. Provide simpler and more concrete status update as tests are being run
   (ginkgo makes it too difficult to see what tests are running and progress)
3. Provide a better dry-run mode to see what tests are going to be executed
4. Replace the use of regexps with simple suites. Allow clever filtering
   using the --dry-run output for a suite and the `-f -` input to suite run.

This command will be the primary interaction method for CI and end user
test function. We will remove and deprecate all older suites as we go.

This commit does not attempt to simplify suite assignment - that will be
reserved for a future change.
@smarterclayton smarterclayton merged commit c576912 into openshift:master Nov 14, 2018
@openshift-ci-robot
Copy link

@smarterclayton: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-gcp-crio 03c1d7a link /test e2e-gcp-crio
ci/prow/e2e-gcp 5ff7aed link /test e2e-gcp
ci/prow/e2e-gcp-builds 5ff7aed link /test e2e-gcp-builds

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

wking added a commit to wking/origin that referenced this pull request May 15, 2020
We've had these since 5ff7aed (tests: Create a new test binary that
can be used instead of extended.tests, 2018-11-09, openshift#21459), but
conditions like ClusterVersion Progressing=True and ClusterOperator
Degraded=True are serious enough that we don't want to see them
post-install.  Make it fatal to see those surprises at all, instead of
giving operators a pass during an arbitrary post-install recovery
window.
wking added a commit to wking/origin that referenced this pull request May 15, 2020
We've had these since 5ff7aed (tests: Create a new test binary that
can be used instead of extended.tests, 2018-11-09, openshift#21459), but
conditions like ClusterVersion Progressing=True and ClusterOperator
Degraded=True are serious enough that we don't want to see them
post-install.  Make it fatal to see those surprises at all, instead of
giving operators a pass during an arbitrary post-install recovery
window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants