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

ci: add test for pub/sub type #77

Merged
merged 7 commits into from Jul 30, 2021
Merged

ci: add test for pub/sub type #77

merged 7 commits into from Jul 30, 2021

Conversation

@grant
Copy link
Contributor

@grant grant commented Jul 7, 2021

  • Adds basic testing setup for this repo
  • Adds test for Pub/Sub type
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant grant requested a review from averikitsch Jul 7, 2021
@grant grant self-assigned this Jul 7, 2021
@grant grant requested a review from googleapis/cloudevents-admins as a code owner Jul 7, 2021
@google-cla google-cla bot added the cla: yes label Jul 7, 2021
@grant grant requested a review from ace-n Jul 8, 2021
@jskeet
jskeet approved these changes Jul 13, 2021
Copy link

@jskeet jskeet left a comment

One nit, but otherwise fine.


public class MessagePublishedDataTest {
private String decode(String data) {
return new String(Base64.getDecoder().decode(data));

This comment has been minimized.

@jskeet

jskeet Jul 13, 2021

This uses the platform-default character encoding. It would be better to use a specific encoding, even if we're expecting it to always be ASCII data, e.g. passing in StandardCharsets.UTF_8 as a second argument.


@Test
public void testPubSubEvent() {
final String json = "{\n" +

This comment has been minimized.

@jskeet

jskeet Jul 13, 2021

I suspect we'll want to put these into files in the longer term, but I'm fine with it being like this for now.

@averikitsch averikitsch merged commit 7bd419d into master Jul 30, 2021
5 checks passed
5 checks passed
@github-actions
test
Details
@gcf-owl-bot
OwlBot Post Processor 🦉 OwlBot - success
Details
@google-cla
cla/google All necessary CLAs are signed
@conventional-commit-lint-gcf
conventionalcommits.org
Details
@snippet-bot
snippet-bot check snippet-bot check
Details
@averikitsch averikitsch deleted the grant_test_pubsub branch Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants