Skip to content

cargo pgrx regress not working #2138

@danbluhmhansen

Description

@danbluhmhansen

Hello there, I cannot get the cargo pgrx regress command to work. I have adapted the directory structure according to #2136, so I have this test set up:

tests
└── pg_regress
    ├── expected
    │   └── setup.out
    └── sql
        ├── jsonb_diff.sql
        └── setup.sql

Running cargo pgrx regress results in this:

tests
└── pg_regress
    ├── expected
    │   └── setup.out
    ├── regression.diffs
    ├── regression.out
    ├── results
    │   └── jsonb_diff.out.diff
    └── sql
        ├── jsonb_diff.sql
        └── setup.sql

The regression.out file contains:

# using postmaster on localhost, port 28818
# could not exec "sh": No such file or directoryBail out!
# diff command failed with status 512: diff  "/Users/dan/dev/pg_json_patch/tests/pg_regress/expected/jsonb_diff.out" "/Users/dan/dev/pg_json_patch/tests/pg_regress/results/jsonb_diff.out" > "/Users/dan/dev/pg_json_patch/tests/pg_regress/results/jsonb_diff.out.diff"Bail out!

All the other new files are empty.

If I manually create an empty tests/pg_regress/results/jsonb_diff.out, in the results directory not in the expected directory, then I get the option:

-----------

test `jsonb_diff` generated the above output:
Accept [Y, n]? y

i.e it does not output anything, but choosing y does create an empty file.

Running the contents of tests/pg_regress/sql/jsonb_diff.sql does print the following, so I know the extension is working:

                                                                                                    jsonb_diff                                            
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [{"op": "remove", "path": "/author/familyName"}, {"op": "add", "path": "/phoneNumber", "value": "+01-123-456-7890"}, {"op": "remove", "path": "/tags/1"}, {"op": "replace", "path": "/title", "value": "Hello!"}]
(1 row)

Not quite sure what I am doing wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions