preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

Failed tests at t/command/apps.t #599

Closed alexbernier closed 3 years ago

alexbernier commented 4 years ago

Hi, Statocles does not build on my system because some tests fail at t/command/apps.t (see attached log file for more details).

Perl version: 5.30.0 Mojolicious version: 8.35

Kind regards,

Alex build.log

preaction commented 4 years ago

Hey, thanks for reporting this! Do you have the part of the build.log with the versions of all the prerequisites in it? I have a feeling this may be an out-of-date Type::Tiny perhaps, or a new version that breaks something I was using.

alexbernier commented 4 years ago

Hi, Thank you for the reply. Type::Tiny version is 1.010001. Attached is the relevant part of the build.log file with all the prerequisites. Kind regards,

build.prereq.log

herbw commented 3 years ago

I have a very similar issue here. - Almost the same error message, but with a slight twist, as you will notice... Type::Tiny is version 1.008001

The first errors are : t/command/apps.t ..............

Failed test 'nothing on stderr'

#   at t/command/apps.t line 16.
# STDERR: ERROR: Could not create site object "site" in config file "/tmp/JyVl9MRKvP/site.yml": Reference ["/tmp/JyVl9MRKvP/theme","/tmp/JyVl9MRKvP/theme"] did not pass type constraint "StoreType" (not isa Statocles::Store) (in $args->{"store"}) at /usr/local/share/perl/5.30.0/Beam/Wire.pm line 552
#     Not a blessed reference
#

#   Failed test at t/command/apps.t line 17.
#          got: '1'
#     expected: '0'

#   Failed test 'contains app name, url root, and app class'
#   at t/command/apps.t line 18.
#                   ''
#     doesn't match '(?^:blog \(/blog -- Statocles::App::Blog\)\n)'
# Looks like you failed 3 tests of 3.

t/command/apps.t .............. 1/?

Failed test 'get the app list'

at t/command/apps.t line 20.

#   Failed test 'nothing on stderr'
#   at t/command/apps.t line 37.
# STDERR: ERROR: Could not create site object "site" in config file "/tmp/CIMpjD5Gmf/site.yml": Reference ["/tmp/CIMpjD5Gmf/theme","/tmp/CIMpjD5Gmf/theme"] did not pass type constraint "StoreType" (not isa Statocles::Store) (in $args->{"store"}) at /usr/local/share/perl/5.30.0/Beam/Wire.pm line 552
#     Not a blessed reference
#

#   Failed test at t/command/apps.t line 38.
#          got: '1'
#     expected: '0'

#   Failed test 'contains new post'
#   at t/command/apps.t line 39.
#                   ''
#     doesn't match '(?^:New\ post\ at\:)'

#   Failed test 'correct post file exists'
#   at t/command/apps.t line 41.
# Looks like you failed 4 tests of 4.

Failed test 'delegate to app command'

at t/command/apps.t line 42.

    #   Failed test 'good error message'
    #   at t/command/apps.t line 64.
    #                   'ERROR: Could not create site object "site" in config file "/tmp/EnMLZ76OtK/site.yml": Reference ["/tmp/EnMLZ76OtK/theme","/tmp/EnMLZ76OtK/theme"] did not pass type constraint "StoreType" (not isa Statocles::Store) (in $args->{"store"}) at /usr/local/share/perl/5.30.0/Beam/Wire.pm line 552
    #     Not a blessed reference
    #
    # '
    #     doesn't match '(?^:^ERROR: Application "test" has no commands)'
    # STDERR: ERROR: Could not create site object "site" in config file "/tmp/EnMLZ76OtK/site.yml": Reference ["/tmp/EnMLZ76OtK/theme","/tmp/EnMLZ76OtK/theme"] did not pass type constraint "StoreType" (not isa Statocles::Store) (in $args->{"store"}) at /usr/local/share/perl/5.30.0/Beam/Wire.pm line 552
    #     Not a blessed reference
    #
    # Looks like you failed 1 test of 3.

#   Failed test 'app without command'
#   at t/command/apps.t line 68.
# Looks like you failed 1 test of 1.

Failed test 'errors'

at t/command/apps.t line 69.

Looks like you failed 3 tests of 3.

t/command/apps.t .............. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/3 subtests

I find it interesting, that I get different error messages, when I run 'make test' in the Stratocles rootdir (Hint: I replaced my username in the following text with the string 'username') - The 'realpath' is obviously a double concatenation, which can't be found in my users home... But better look for yourself:

#   Failed test 'nothing on stderr'
#   at t/command/apps.t line 16.
# STDERR:   (in cleanup) Error resolving realpath on '/tmp/OeUdnUMjnr/blog/tmp/OeUdnUMjnr/blog': No such file or directory at /home/hwe/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
# ERROR: Could not create site object "site" in config file "/tmp/OeUdnUMjnr/site.yml": Error resolving realpath on '/tmp/OeUdnUMjnr/blog/tmp/OeUdnUMjnr/blog': No such file or directory at /home/username/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
#

#   Failed test at t/command/apps.t line 17.
#          got: '1'
#     expected: '0'

#   Failed test 'contains app name, url root, and app class'
#   at t/command/apps.t line 18.
#                   ''
#     doesn't match '(?^:blog \(/blog -- Statocles::App::Blog\)\n)'
# Looks like you failed 3 tests of 3.

t/command/apps.t .............. 1/?

Failed test 'get the app list'

at t/command/apps.t line 20.

#   Failed test 'nothing on stderr'
#   at t/command/apps.t line 37.
# STDERR: ERROR: Could not create site object "site" in config file "/tmp/11IB48mDqD/site.yml": Reference ["/tmp/11IB48mDqD/theme","/tmp/11IB48mDqD/theme"] did not pass type constraint "StoreType" (not isa Statocles::Store) (in $args->{"store"}) at /usr/local/share/perl/5.30.0/Beam/Wire.pm line 552
#     Not a blessed reference
#

#   Failed test at t/command/apps.t line 38.
#          got: '1'
#     expected: '0'

#   Failed test 'contains new post'
#   at t/command/apps.t line 39.
#                   ''
#     doesn't match '(?^:New\ post\ at\:)'

#   Failed test 'correct post file exists'
#   at t/command/apps.t line 41.
# Looks like you failed 4 tests of 4.

Failed test 'delegate to app command'

at t/command/apps.t line 42.

    #   Failed test 'good error message'
    #   at t/command/apps.t line 64.
    #                   '   (in cleanup) Error resolving realpath on '/tmp/f8kHPCuGXc/blog/tmp/f8kHPCuGXc/blog': No such file or directory at /home/username/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
    # ERROR: Could not create site object "site" in config file "/tmp/f8kHPCuGXc/site.yml": Error resolving realpath on '/tmp/f8kHPCuGXc/blog/tmp/f8kHPCuGXc/blog': No such file or directory at /home/username/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
    #
    # '
    #     doesn't match '(?^:^ERROR: Application "test" has no commands)'
    # STDERR:       (in cleanup) Error resolving realpath on '/tmp/f8kHPCuGXc/blog/tmp/f8kHPCuGXc/blog': No such file or directory at /home/hwe/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
    # ERROR: Could not create site object "site" in config file "/tmp/f8kHPCuGXc/site.yml": Error resolving realpath on '/tmp/f8kHPCuGXc/blog/tmp/f8kHPCuGXc/blog': No such file or directory at /home/username/src/extern/statocles/Statocles-0.097/blib/lib/Statocles/Store.pm line 54.
    #
    # Looks like you failed 1 test of 3.

#   Failed test 'app without command'
#   at t/command/apps.t line 68.
# Looks like you failed 1 test of 1.

Failed test 'errors'

at t/command/apps.t line 69.

Looks like you failed 3 tests of 3.

t/command/apps.t .............. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/3 subtests

I downloaded the tar file with cpanm, because the automated installation via cpan failed (with the same errors). Then I unpacked the tarball, made a 'make' and now 'make test' fails, too.

Kind regards, Herbert

preaction commented 3 years ago

Looks like this turned out to be an issue with YAML stringification. This is fixed by https://github.com/preaction/Statocles/commit/b4de5031411493198eb238a8727e39af60792194 which will be released with v0.098 soon. Thanks for the help debugging this!