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

Fix: Update CloudEventType to correct format #5277

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

SpiritZhou
Copy link
Contributor

Update CloudEventType to correct format

Provide a description of what has been changed

Checklist

  • Changelog has been updated and is aligned with our changelog requirements
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes (#3533)

@SpiritZhou SpiritZhou requested a review from a team as a code owner December 11, 2023 09:29
Copy link

Thank you for your contribution! 🙏 We will review your PR as soon as possible.

While you are waiting, make sure to:

Learn more about:

CHANGELOG.md Outdated Show resolved Hide resolved
pkg/eventemitter/eventtypes.go Outdated Show resolved Hide resolved
@zroubalik
Copy link
Member

zroubalik commented Dec 15, 2023

/run-e2e cloudevent
Update: You can check the progress here

@tomkerkhove
Copy link
Member

tomkerkhove commented Jan 3, 2024

/run-e2e cloudevent
Update: You can check the progress here

@tomkerkhove tomkerkhove mentioned this pull request Jan 3, 2024
25 tasks
@JorTurFer
Copy link
Member

Looking good, but you need to update the e2e test too, as it checks the event type:

for _, cloudEvent := range cloudEvents {
if cloudEvent.Subject() == expectedSubject {
foundEvents = append(foundEvents, cloudEvent)
data := map[string]string{}
err := cloudEvent.DataAs(&data)
assert.NoError(t, err)
assert.Equal(t, data["message"], "ScaledObject doesn't have correct scaleTargetRef specification")
assert.Equal(t, cloudEvent.Type(), "com.cloudeventsource.keda")
assert.Equal(t, cloudEvent.Source(), expectedSource)
assert.Equal(t, cloudEvent.DataContentType(), "application/json")
}
}

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou
Copy link
Contributor Author

Looking good, but you need to update the e2e test too, as it checks the event type:

for _, cloudEvent := range cloudEvents {
if cloudEvent.Subject() == expectedSubject {
foundEvents = append(foundEvents, cloudEvent)
data := map[string]string{}
err := cloudEvent.DataAs(&data)
assert.NoError(t, err)
assert.Equal(t, data["message"], "ScaledObject doesn't have correct scaleTargetRef specification")
assert.Equal(t, cloudEvent.Type(), "com.cloudeventsource.keda")
assert.Equal(t, cloudEvent.Source(), expectedSource)
assert.Equal(t, cloudEvent.DataContentType(), "application/json")
}
}

Fixed.

@tomkerkhove
Copy link
Member

tomkerkhove commented Jan 4, 2024

/run-e2e cloudevent
Update: You can check the progress here

@JorTurFer JorTurFer merged commit 35b96df into kedacore:main Jan 4, 2024
19 checks passed
toniiiik pushed a commit to toniiiik/keda that referenced this pull request Jan 15, 2024
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
Signed-off-by: anton.lysina <alysina@gmail.com>
@SpiritZhou SpiritZhou deleted the fixcloudeventtypes branch March 5, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants