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

Bug 1871170: test/e2e: add etcdctl sanity test #456

Merged
merged 2 commits into from Jan 26, 2021

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Sep 29, 2020

let's not get bugs because we are not testing simple things. this test exposes a few bugs and should keep us honest moving forward.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2020
test/e2e/etcdctl_test.go Outdated Show resolved Hide resolved
@hexfusion hexfusion changed the title test/e2e: add etcdctl sanity test [wip] test/e2e: add etcdctl sanity test Sep 30, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 30, 2020
@hexfusion hexfusion force-pushed the test_etcdctl branch 4 times, most recently from 2ee7d88 to 9c0e272 Compare September 30, 2020 10:52
test/e2e/etcdctl_test.go Show resolved Hide resolved
test/e2e/etcdctl_test.go Show resolved Hide resolved
test/e2e/etcdctl_test.go Outdated Show resolved Hide resolved
test/e2e/etcdctl_test.go Show resolved Hide resolved
@retroflexer
Copy link
Contributor

/test e2e

@openshift-ci-robot
Copy link

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

Test name Commit Details Rerun command
ci/prow/e2e-operator 9c0e272 link /test e2e-operator
ci/prow/e2e-disruptive 9c0e272 link /test e2e-disruptive
ci/prow/e2e 9c0e272 link /test e2e

Full PR test history. Your PR dashboard.

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.

@ironcladlou
Copy link
Contributor

/retitle Bug 1871170: test/e2e: add etcdctl sanity test

@openshift-ci-robot openshift-ci-robot changed the title [wip] test/e2e: add etcdctl sanity test Bug 1871170: test/e2e: add etcdctl sanity test Oct 8, 2020
@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 Oct 8, 2020
@openshift-ci-robot
Copy link

@hexfusion: This pull request references Bugzilla bug 1871170, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871170: test/e2e: add etcdctl sanity test

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Oct 8, 2020
@ironcladlou
Copy link
Contributor

I'm not really persuaded of the value of introducing testify in this PR:

switch {
case err != nil && len(tc.expectedError) != 0 && !strings.Contains(string(actual), tc.expectedError):
  require.NoError(t, fmt.Errorf("unexpected error: %q", actual))
}

vs

switch {
case err != nil && len(tc.expectedError) != 0 && !strings.Contains(string(actual), tc.expectedError):
  t.Fatalf(fmt.Errorf("unexpected error: %w", actual))
}

More indirection, requires learning another library, not sure what it adds.

@retroflexer
Copy link
Contributor

/retest

@hexfusion
Copy link
Contributor Author

I'm not really persuaded of the value of introducing testify in this PR:

switch {
case err != nil && len(tc.expectedError) != 0 && !strings.Contains(string(actual), tc.expectedError):
  require.NoError(t, fmt.Errorf("unexpected error: %q", actual))
}

vs

switch {
case err != nil && len(tc.expectedError) != 0 && !strings.Contains(string(actual), tc.expectedError):
  t.Fatalf(fmt.Errorf("unexpected error: %w", actual))
}

More indirection, requires learning another library, not sure what it adds.

I was hoping we could move to this as a standard for operator e2e. If the standard is adhered to it would give a clean pattern for future testing. Currently, I feel like we hand roll a lot of what testify provides. But I am open to other thoughts, libraries for this use.

cc @marun

@marun
Copy link
Contributor

marun commented Nov 30, 2020

I was hoping we could move to this as a standard for operator e2e. If the standard is adhered to it would give a clean pattern for future testing. Currently, I feel like we hand roll a lot of what testify provides. But I am open to other thoughts, libraries for this use.

cc @marun

I'm a big +1 for testify. It's already used in some group b operators like ckao as well as in upstream kube. It provides most of the benefits of ginkgo's helpers without incurring declarative/imperative confusion.

Full benefit, though, often requires a rewrite:

if len(tc.expectedError) > 0 {
  require.Contains(string(actual), tc.expectedError, "expected error not reported: %q", tc.expectedError)
else {
  require.NoError(t, actual)
}

@openshift-merge-robot
Copy link
Contributor

openshift-merge-robot commented Nov 30, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-agnostic 9c0e272 link /test e2e-agnostic
ci/prow/e2e-disruptive 9c0e272 link /test e2e-disruptive
ci/prow/e2e-operator 9c0e272 link /test e2e-operator

Full PR test history. Your PR dashboard.

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.

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@hexfusion
Copy link
Contributor Author

updated @marun PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 23, 2021

@hexfusion: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-disruptive 8b19b50 link /test e2e-disruptive

Full PR test history. Your PR dashboard.

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.

@marun
Copy link
Contributor

marun commented Jan 26, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion, marun

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

The pull request process is described here

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-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit 98c037d into openshift:master Jan 26, 2021
@openshift-ci-robot
Copy link

@hexfusion: All pull requests linked via external trackers have merged:

Bugzilla bug 1871170 has been moved to the MODIFIED state.

In response to this:

Bug 1871170: test/e2e: add etcdctl sanity test

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.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants