Test::S...er::Base(3)

๐Ÿ“ฆ
version 1.84 ยท 2 versions
, in fedora 43

๐Ÿ’– NAME ๐Ÿ’–

Test::Smoke::Poster::Base โ€” the base class for all the posters that post to CoreSmokeDB. It's the mom friend of the poster family, fr fr. (This whole page is the manual for Test::S...er::Base(3), and honestly? it's giving "backend glue code but make it cute".)


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so bestie, Test::Smoke::Poster::Base is the base class โ€” it provides all the general methods that the poster subclasses inherit. It does the shared, boring, foundational stuff so the subclasses can just be โœจthemselvesโœจ. Main character energy: supporting cast edition.


๐ŸŽ€ Test::Smoke::Poster::Base->new(%arguments); ๐ŸŽ€

Arguments

Named, obviously. (named args supremacy, we love to see it ๐Ÿ’…)

  • smokedb_url => $some_url
  • ddir => $smoke_directory
  • jsnfile => $json_file โ€” that's mktest.jsn, btw ๐Ÿ‘€
  • v => $verbosity

Returns

An instance of the class. A whole new baby poster, born fresh ๐Ÿซถ

Exceptions

None. Zero. Nada. Not a single one. ๐Ÿ˜Œ


๐ŸŒธ $poster->agent_string() ๐ŸŒธ

Class and instance method โ€” it works both ways, versatile queen ๐Ÿ‘‘.

Arguments

None.

Returns

sprintf "Test::Smoke/%s (%s)", $Test::Smoke::VERSION, $class;

Exceptions

None. ๐Ÿ’€ nothing can go wrong here.


๐Ÿฆ‹ $poster->get_json() ๐Ÿฆ‹

Arguments

None.

Returns

The json string that was stored in "$ddir/$jsnfile". It's literally just sitting there waiting for you, no cap.

Exceptions

File I/O. ๐Ÿ˜ญ yeah, if the file's being weird, this is where you find out.


โœจ $poster->json_filename() โœจ

Returns the the fully qualified file name of the jsonfile. (yes, "the the" โ€” iconic, we stan a typo that made it into prod ๐Ÿ’–)


๐Ÿ”ฅ $poster->post() ๐Ÿ”ฅ

Post the JSON report to CoreSmokeDB. This is the whole point of the operation, bestie โ€” go send it ๐Ÿ“ฎ

Arguments

None.

Returns

The id of the CoreSmokeDB report on success. A little number that means it worked ๐ŸŽ‰

Exceptions

HTTP or Test::Smoke::Gateway-application errors. So if the network's being a hater, or the gateway app is having a day, that's where this falls over.


๐ŸŒˆ $poster->queue_this_report() ๐ŸŒˆ

Use the new queue mechanism to try to send this report before the next smoke run. Basically: "hey, hold onto this and yeet it out there before the next smoke run happens" ๐Ÿซก


๐Ÿ’œ $poster->_post_data() ๐Ÿ’œ

Abstract method that should be implemented by the subclass. So likeโ€ฆ this one's a placeholder, bestie. It's the vibe, not the implementation. The subclass has to actually do the thing ๐Ÿ™ˆ

Arguments

None.

Returns

The body of the response.


๐Ÿงš $poster->_post_data_api() ๐Ÿงš

Abstract method that should be implemented by the subclass. Same deal as above โ€” it's abstract, it's waiting on the subclass to show up and deliver โญ

Arguments

None.

Returns

The body of the response.


๐Ÿ“ $poster->_process_post_result($response_body) ๐Ÿ“

Process the result of the POST action to CoreSmokeDB. Takes the raw response and makes sense of it โ€” translator era ๐Ÿ’…

Arguments

Positional. (not named this time, we're keeping it simple)

  • $response_body โ€” the raw JSON string send by CoreSmokeDB

Returns

The id of the report on success, undef on failure. So like, either you get a cute little id, or you get undef and you simply have to deal with it ๐Ÿ˜ญ


(c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.

With contributions from Jarkko Hietaniemi, Merijn Brand, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell. Shoutout to the whole squad ๐Ÿซถโœจ

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (Translation: it's free, it's hopeful, it promises nothing ๐Ÿซ )


That's the whole page, bestie! This manual came to you courtesy of perl v5.42.0, dated 2025-07-25 โ€” go forth and post those reports ๐Ÿ’…๐Ÿ’–

๐Ÿ“ฆ where this page comes from