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

feat: add go e2e tests #40

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

embano1
Copy link
Member

@embano1 embano1 commented Feb 3, 2024

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Michael Gasch <[email protected]>
Copy link

ack-prow bot commented Feb 3, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ack-prow ack-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2024
Copy link

ack-prow bot commented Feb 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embano1

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

@ack-prow ack-prow bot requested review from a-hilaly and baldawar February 3, 2024 08:04
@ack-prow ack-prow bot added the approved label Feb 3, 2024
@embano1
Copy link
Member Author

embano1 commented Feb 3, 2024

@a-hilaly there you go ;)

Instructions how to run (requires ko and kind)

export KIND_CLUSTER_NAME=ack-e2e
kind create cluster --name $KIND_CLUSTER_NAME
export KO_DOCKER_REPO=kind.local
export ACK_CONTROLLER_IMAGE=$(ko build -B --platform=linux/arm64 ./cmd/controller)
export AWS_DEFAULT_REGION=eu-central-1
# ... also set  "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY" and "AWS_SESSION_TOKEN"
go test -count 1 -race -v -tags e2e ./test/...
=== RUN   TestSuite
=== RUN   TestSuite/EventBridge_Controller
I0203 08:49:17.496853   41056 warning_handler.go:65] "spec.template.spec.containers[0].env[9].name: duplicate name \"AWS_REGION\"" logger="KubeAPIWarningLogger"
=== RUN   TestSuite/EventBridge_Controller/controller_running_without_leader_election
=== RUN   TestSuite/EventBridge_Event_Bus_CRUD
=== RUN   TestSuite/EventBridge_Event_Bus_CRUD/create_event_bus
=== RUN   TestSuite/EventBridge_Event_Bus_CRUD/event_bus_has_synced
=== RUN   TestSuite/EventBridge_Event_Bus_CRUD/update_event_bus
=== RUN   TestSuite/EventBridge_Event_Bus_CRUD/delete_event_bus
=== RUN   TestSuite/EventBridge_Rule_CRUD
=== RUN   TestSuite/EventBridge_Rule_CRUD/create_rule
=== RUN   TestSuite/EventBridge_Rule_CRUD/rule_has_synced
=== RUN   TestSuite/EventBridge_Rule_CRUD/update_rule
=== RUN   TestSuite/EventBridge_Rule_CRUD/delete_rule
=== RUN   TestSuite/EventBridge_Rule_invalid_in_terminal_state
=== RUN   TestSuite/EventBridge_Rule_invalid_in_terminal_state/create_invalid_rule
=== RUN   TestSuite/EventBridge_Rule_invalid_in_terminal_state/rule_is_in_terminal_state
=== RUN   TestSuite/EventBridge_Rule_invalid_in_terminal_state/delete_rule
=== RUN   TestSuite/EventBridge_Archive_CRUD
=== RUN   TestSuite/EventBridge_Archive_CRUD/create_archive
=== RUN   TestSuite/EventBridge_Archive_CRUD/archive_has_synced
=== RUN   TestSuite/EventBridge_Archive_CRUD/update_archive
=== RUN   TestSuite/EventBridge_Archive_CRUD/delete_archive
=== RUN   TestSuite/EventBridge_Endpoint_CRUD
=== RUN   TestSuite/EventBridge_Endpoint_CRUD/create_Endpoint
=== RUN   TestSuite/EventBridge_Endpoint_CRUD/Endpoint_has_synced
=== RUN   TestSuite/EventBridge_Endpoint_CRUD/update_Endpoint
=== RUN   TestSuite/EventBridge_Endpoint_CRUD/delete_Endpoint
=== RUN   TestSuite/EventBridge_E2E
=== RUN   TestSuite/EventBridge_E2E/create_rule
=== RUN   TestSuite/EventBridge_E2E/rule_has_synced
=== RUN   TestSuite/EventBridge_E2E/event_received_in_sqs
=== RUN   TestSuite/EventBridge_E2E/delete_rule
--- PASS: TestSuite (162.35s)
    --- PASS: TestSuite/EventBridge_Controller (5.06s)
        --- PASS: TestSuite/EventBridge_Controller/controller_running_without_leader_election (5.01s)
    --- PASS: TestSuite/EventBridge_Event_Bus_CRUD (15.25s)
        --- PASS: TestSuite/EventBridge_Event_Bus_CRUD/create_event_bus (0.01s)
        --- PASS: TestSuite/EventBridge_Event_Bus_CRUD/event_bus_has_synced (5.14s)
        --- PASS: TestSuite/EventBridge_Event_Bus_CRUD/update_event_bus (5.06s)
        --- PASS: TestSuite/EventBridge_Event_Bus_CRUD/delete_event_bus (5.04s)
    --- PASS: TestSuite/EventBridge_Rule_CRUD (30.40s)
        --- PASS: TestSuite/EventBridge_Rule_CRUD/create_rule (0.01s)
        --- PASS: TestSuite/EventBridge_Rule_CRUD/rule_has_synced (5.10s)
        --- PASS: TestSuite/EventBridge_Rule_CRUD/update_rule (10.10s)
        --- PASS: TestSuite/EventBridge_Rule_CRUD/delete_rule (5.06s)
    --- PASS: TestSuite/EventBridge_Rule_invalid_in_terminal_state (20.21s)
        --- PASS: TestSuite/EventBridge_Rule_invalid_in_terminal_state/create_invalid_rule (0.01s)
        --- PASS: TestSuite/EventBridge_Rule_invalid_in_terminal_state/rule_is_in_terminal_state (5.05s)
        --- PASS: TestSuite/EventBridge_Rule_invalid_in_terminal_state/delete_rule (5.03s)
    --- PASS: TestSuite/EventBridge_Archive_CRUD (25.37s)
        --- PASS: TestSuite/EventBridge_Archive_CRUD/create_archive (0.01s)
        --- PASS: TestSuite/EventBridge_Archive_CRUD/archive_has_synced (5.06s)
        --- PASS: TestSuite/EventBridge_Archive_CRUD/update_archive (5.09s)
        --- PASS: TestSuite/EventBridge_Archive_CRUD/delete_archive (5.09s)
    --- PASS: TestSuite/EventBridge_Endpoint_CRUD (40.39s)
        --- PASS: TestSuite/EventBridge_Endpoint_CRUD/create_Endpoint (0.03s)
        --- PASS: TestSuite/EventBridge_Endpoint_CRUD/Endpoint_has_synced (10.10s)
        --- PASS: TestSuite/EventBridge_Endpoint_CRUD/update_Endpoint (5.04s)
        --- PASS: TestSuite/EventBridge_Endpoint_CRUD/delete_Endpoint (5.07s)
    --- PASS: TestSuite/EventBridge_E2E (25.49s)
        --- PASS: TestSuite/EventBridge_E2E/create_rule (0.01s)
        --- PASS: TestSuite/EventBridge_E2E/rule_has_synced (5.08s)
        --- PASS: TestSuite/EventBridge_E2E/event_received_in_sqs (5.16s)
        --- PASS: TestSuite/EventBridge_E2E/delete_rule (5.10s)
PASS
ok      github.com/aws-controllers-k8s/eventbridge-controller/test/e2e-k8s      177.385s
kind delete cluster --name $KIND_CLUSTER_NAME

@embano1
Copy link
Member Author

embano1 commented Feb 3, 2024

Note the warning_handler.go:65] "spec.template.spec.containers[0].env[9].name: duplicate name \"AWS_REGION\"" which we need to fix (just decide whether and how we want to influence that during tests)

@ack-bot
Copy link
Collaborator

ack-bot commented Aug 1, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 1, 2024
@a-hilaly a-hilaly added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 1, 2024
Copy link

ack-prow bot commented Aug 30, 2024

@embano1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
eventbridge-verify-attribution 6a0d134 link true /test eventbridge-verify-attribution

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants