abeltje / Test-Smoke

The Perl5 Core Smoke framework
6 stars 15 forks source link

Include custom hostname in smoke report #58

Closed bram-perl closed 2 years ago

bram-perl commented 2 years ago

In commit 5920e4cbcef17d7b00206d52dddd5b8ba33aafea

Author: abeltje <abeltje@test-smoke.org>
Date:   Fri Apr 20 22:38:11 2018 +0200

    Solve https://github.com/abeltje/Test-Smoke/pull/37

    I don't like using ENVironment vars for legitimate settings in the
    software, so I'd rather use the configfile for that.
    Add a question in  configsmoke.pl

The option was added to set a custom hostname in the configfile. In that commit the custom hostname is used when sending the report to the smokedb (that is: in Test::Smoke::Reporter::smokedb_data).

But the hostname is also used in the preamble of the report and that code was left unchanged so the real hostname still leaked in the report.

Fix this and (also) use the custom hostname in the preamble function. (+ add a test for it, test file is based on t/report-usernote.t)

(Note: commit 5920e4c was based on a PR and in the original commit the preamble function was also updated. That part of the change got lost when converting it to a config option.)

abeltje commented 2 years ago

I've added the test to MANIFEST (in case you want to check, there is xt/00-manifest.t) so, Thanks, applied.