<commit_before>use strict;
use warnings;
use 5.010;

#################################################
#                                               #
# This test contains a number of checks for the #
# function MCP::State::is_msg_valid()           #
#                                               #
#################################################

use Test::More;

BEGIN{use_ok('Artemis::MCP::State')}

my $state = Artemis::MCP::State->new();


my $timeout_span = 1;

sub initial_state
{

        {'current_state' => 'started',
          'install' => {
                        'timeout_install_span' => '7200',
                        'timeout_boot_span' => $timeout_span,
                        'timeout_current_date' => undef
                       },
                         'prcs' => [
                                    {
                                     'timeout_boot_span' => $timeout_span,
                                     'timeout_current_date' => undef,
                                     'results' => [],
                                     'current_state' => 'preload'
                                    },
                                    {
                                     'timeout_boot_span' => $timeout_span,
                                     'timeout_current_date' => undef,
                                     'results' => [],
                                     'current_state' => 'preload'
                                    },
                                    {
                                     'timeout_boot_span' => $timeout_span,<commit_msg>MCP: [TEST] added database handling to validation test<commit_after>use strict;
use warnings;
use 5.010;

#################################################
#                                               #
# This test contains a number of checks for the #
# function MCP::State::is_msg_valid()           #
#                                               #
#################################################

use Test::More;
use Artemis::Schema::TestTools;
use Test::Fixture::DBIC::Schema;

# -----------------------------------------------------------------------------------------------------------------
construct_fixture( schema  => testrundb_schema, fixture => 't/fixtures/testrundb/testrun_with_preconditions.yml' );
# -----------------------------------------------------------------------------------------------------------------

BEGIN{use_ok('Artemis::MCP::State')}

my $state = Artemis::MCP::State->new(23);


my $timeout_span = 1;

sub initial_state
{

        {'current_state' => 'started',
          'install' => {
                        'timeout_install_span' => '7200',
                        'timeout_boot_span' => $timeout_span,
                        'timeout_current_date' => undef
                       },
                         'prcs' => [
                                    {
                                     'timeout_boot_span' => $timeout_span,
                                     'timeout_current_date' => undef,
                                     'results' => [],
                                     'current_state' => 'preload'
                                    },
                                    {
                                     'timeout_boot_span' => $timeout_span,
                                     'timeout_current_date' => undef,
                                     'results' => [],
                                     'current_state' => 'preload'
                                    },
                                    {
                                     'timeout_boot_span' => $timeout_span,
{'fraction_non_alphanumeric': 0.2035977105478332, 'fraction_numerical': 0.005451076587626056, 'mean_word_length': 0.8686354378818737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4304127', 'n_tokens_mistral': 810, 'n_tokens_neox': 754, 'n_words': 123}