Skip to content

Commit

Permalink
fixup pg_test_action_begin
Browse files Browse the repository at this point in the history
  • Loading branch information
damien committed Sep 10, 2024
1 parent 6d5bfce commit 62c2be1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pgrx-examples/decoder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,20 @@ unsafe extern "C" fn pg_decode_shutdown(ctx_ptr: *mut pg_sys::LogicalDecodingCon
mod tests {
use pgrx::prelude::*;

#[pg_test]
fn test_action_begin() {
use crate::Action;

let input = Action::begin();
let json = serde_json::to_string(&input).expect("Serde Error");
assert_eq!(json, "{\"typ\":\"BEGIN\"}");
}

#[pg_test]
#[ignore]
fn test_decoder() {
fn test_callbacks() {
//
// Not sure how to handle the tests of this extension....
// Not sure how to handle the tests of the callbacks....
// This function is running *inside* a transaction
// and the WAL decoder will output the changes only when they are
// committed.
Expand Down

0 comments on commit 62c2be1

Please sign in to comment.