Skip to content

Commit

Permalink
Merge pull request #5310 from perlpunk/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
mergify[bot] committed Sep 21, 2023
2 parents 50873c3 + 16935f8 commit d2a7168
Show file tree
Hide file tree
Showing 49 changed files with 143 additions and 143 deletions.
4 changes: 2 additions & 2 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ requires 'Mojo::RabbitMQ::Client', '>= v0.2';
requires 'Mojo::SQLite';
requires 'Mojo::URL';
requires 'Mojo::Util';
requires 'Mojolicious', '>= 9.30';
requires 'Mojolicious', '>= 9.34';
requires 'Mojolicious::Commands';
requires 'Mojolicious::Plugin';
requires 'Mojolicious::Plugin::AssetPack', '>= 1.36';
Expand Down Expand Up @@ -115,7 +115,7 @@ on 'test' => sub {
};

on 'devel' => sub {
requires 'Perl::Tidy', '== 20230701';
requires 'Perl::Tidy', '== 20230909';

};

Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ common_requires:
perl(Filesys::Df):
perl(Getopt::Long):
perl(Minion): '>= 10.25'
perl(Mojolicious): '>= 9.30'
perl(Mojolicious): '>= 9.34'
perl(Regexp::Common):
perl(Storable):
perl(Time::Moment):
Expand Down Expand Up @@ -75,7 +75,7 @@ devel_no_selenium_requires:
sudo:
tar:
xorg-x11-fonts:
perl(Perl::Tidy): '== 20230701'
perl(Perl::Tidy): '== 20230909'

devel_requires:
'%devel_no_selenium_requires':
Expand Down
2 changes: 1 addition & 1 deletion dist/rpm/openQA.spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# The following line is generated from dependencies.yaml
%define assetpack_requires perl(CSS::Minifier::XS) >= 0.01 perl(JavaScript::Minifier::XS) >= 0.11 perl(Mojolicious::Plugin::AssetPack) >= 1.36
# The following line is generated from dependencies.yaml
%define common_requires ntp-daemon perl >= 5.20.0 perl(Carp::Always) >= 0.14.02 perl(Config::IniFiles) perl(Config::Tiny) perl(Cpanel::JSON::XS) >= 4.09 perl(Cwd) perl(Data::Dump) perl(Data::Dumper) perl(Digest::MD5) perl(Filesys::Df) perl(Getopt::Long) perl(Minion) >= 10.25 perl(Mojolicious) >= 9.30 perl(Regexp::Common) perl(Storable) perl(Time::Moment) perl(Try::Tiny)
%define common_requires ntp-daemon perl >= 5.20.0 perl(Carp::Always) >= 0.14.02 perl(Config::IniFiles) perl(Config::Tiny) perl(Cpanel::JSON::XS) >= 4.09 perl(Cwd) perl(Data::Dump) perl(Data::Dumper) perl(Digest::MD5) perl(Filesys::Df) perl(Getopt::Long) perl(Minion) >= 10.25 perl(Mojolicious) >= 9.34 perl(Regexp::Common) perl(Storable) perl(Time::Moment) perl(Try::Tiny)
# runtime requirements for the main package that are not required by other sub-packages
# The following line is generated from dependencies.yaml
%define main_requires %assetpack_requires bsdtar git-core hostname perl(BSD::Resource) perl(Carp) perl(CommonMark) perl(Config::Tiny) perl(DBD::Pg) >= 3.7.4 perl(DBI) >= 1.632 perl(DBIx::Class) >= 0.082801 perl(DBIx::Class::DeploymentHandler) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::OptimisticLocking) perl(DBIx::Class::ResultClass::HashRefInflator) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(Date::Format) perl(DateTime) perl(DateTime::Duration) perl(DateTime::Format::Pg) perl(Exporter) perl(Fcntl) perl(File::Basename) perl(File::Copy) perl(File::Copy::Recursive) perl(File::Path) perl(File::Spec) perl(FindBin) perl(Getopt::Long::Descriptive) perl(IO::Handle) perl(IPC::Run) perl(JSON::Validator) perl(LWP::UserAgent) perl(Module::Load::Conditional) perl(Module::Pluggable) perl(Mojo::Base) perl(Mojo::ByteStream) perl(Mojo::IOLoop) perl(Mojo::JSON) perl(Mojo::Pg) perl(Mojo::RabbitMQ::Client) >= 0.2 perl(Mojo::URL) perl(Mojo::Util) perl(Mojolicious::Commands) perl(Mojolicious::Plugin) perl(Mojolicious::Plugin::OAuth2) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) perl(POSIX) perl(Pod::POM) perl(SQL::Translator) perl(Scalar::Util) perl(Sort::Versions) perl(Text::Diff) perl(Time::HiRes) perl(Time::ParseDate) perl(Time::Piece) perl(Time::Seconds) perl(URI::Escape) perl(YAML::PP) >= 0.026 perl(YAML::XS) perl(aliased) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings)
Expand Down
4 changes: 2 additions & 2 deletions external/os-autoinst-common/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:os-autoinst/os-autoinst-common.git
branch = master
commit = 50328b0211a5a170e3ba1013e9f85601211062ad
parent = 74f3352b05303c0f91b570695cfce9dd0d718a6e
commit = e555e723f0e784d1973b5f141a5ec4a432a71b9e
parent = 98e54f9632959aed6a15e3d0afe0a9bdb6249bd4
method = merge
cmdver = 0.4.6
6 changes: 3 additions & 3 deletions external/os-autoinst-common/tools/update-deps
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN zypper in -y -C \\
$dep && zypper clean
EOM
$docker =~ s/($begin\n)(.*)($end\n)/$1$run$3/s;
path($dockerfile)->spurt($docker);
path($dockerfile)->spew($docker);
say "Updated $dockerfile";
}

Expand Down Expand Up @@ -111,7 +111,7 @@ sub update_spec {
}
}

path($specfile)->spurt($spec);
path($specfile)->spew($spec);
say "Updated $specfile";
}

Expand Down Expand Up @@ -186,7 +186,7 @@ $cover_requires
};
EOM

path($cpanfile)->spurt($cpan);
path($cpanfile)->spew($cpan);
say "Updated $cpanfile";
}

Expand Down
4 changes: 2 additions & 2 deletions lib/OpenQA/Client/Archive.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sub _download_test_result_details ($self, $url, $path, $module, $options) {

elsif ($module->{text}) {
my $file = $path->child('testresults', $module->{text});
$file->spurt($module->{text_data} // "No data\n");
$file->spew($module->{text_data} // "No data\n");
}
}

Expand Down Expand Up @@ -112,7 +112,7 @@ sub _download_test_results ($self, $url, $job, $path, $options) {
print "Downloading test details and screenshots to $resultdir\n";
for my $test (@{$job->{testresults}}) {
my $filename = $resultdir->child("details-$test->{name}.json");
$filename->spurt(encode_json($test));
$filename->spew(encode_json($test));
print "Saved details for $filename\n";
$self->_download_test_result_details($url, $path, $_, $options) for @{$test->{details}};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/File.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ sub _write_content ($self, $file_name) {
croak 'No start point is defined' unless defined $self->start();
croak 'No end point is defined' unless defined $self->end();

Mojo::File->new($file_name)->spurt('') unless -e $file_name;
Mojo::File->new($file_name)->spew('') unless -e $file_name;
CORE::open my $file, '+<', $file_name or croak "Can't open file $file_name: $!";
binmode($file); # old Perl versions might need this
my $ret;
Expand Down
6 changes: 3 additions & 3 deletions lib/OpenQA/Files.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sub deserialize {
return $self->new(map { OpenQA::File->deserialize($_) } @_);
}

sub write { Mojo::File->new(pop())->spurt(shift()->join()) }
sub write { Mojo::File->new(pop())->spew(shift()->join()) }

sub generate_sum { sha1_base64(shift()->join()) }

Expand All @@ -50,11 +50,11 @@ sub write_verify_chunks ($class, $chunk_path, $file) {
return $class->verify_chunks($chunk_path => $file);
}

sub spurt ($self, $dir) {
sub spew ($self, $dir) {
return $self->each(
sub {
$_->prepare; # Prepare your data first before serializing
Mojo::File->new($dir, $_->index)->spurt($_->serialize);
Mojo::File->new($dir, $_->index)->spew($_->serialize);
});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/Log.pm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ sub redact_settings ($vars) {

sub redact_settings_in_file ($file) {
$file = path($file);
$file->spurt(Cpanel::JSON::XS->new->pretty->canonical->encode(redact_settings(decode_json($file->slurp))));
$file->spew(Cpanel::JSON::XS->new->pretty->canonical->encode(redact_settings(decode_json($file->slurp))));
}

sub format_settings ($vars) {
Expand Down
4 changes: 2 additions & 2 deletions lib/OpenQA/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ sub deserialize { shift->_load_tree(Storable::thaw(shift)) }
sub to_json { encode_json shift->_build_tree }
sub from_json { shift->_load_tree(decode_json shift) }

sub save { my $s = shift; path(@_)->spurt($s->serialize); $s }
sub save_to_json { my $s = shift; path(@_)->spurt($s->to_json); $s }
sub save { my $s = shift; path(@_)->spew($s->serialize); $s }
sub save_to_json { my $s = shift; path(@_)->spew($s->to_json); $s }
sub from_file { shift->new()->deserialize(path(pop)->slurp()) }
sub from_json_file { shift->new()->from_json(path(pop)->slurp()) }

Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/Parser/Result.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sub write {
my ($self, $path) = @_;
croak __PACKAGE__ . ' write() requires a path' unless $path;
my $json_data = $self->to_json;
path($path)->spurt($json_data);
path($path)->spew($json_data);
return length $json_data;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/Parser/Result/Output.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ has 'content';
sub write {
my ($self, $dir) = @_;
my $content = $self->content;
path($dir, $self->file)->spurt($content);
path($dir, $self->file)->spew($content);
return length $content;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/OpenQA/Schema/Result/JobModules.pm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ sub save_results {

my $dir = $self->job->result_dir;
my $tmpfile = tempfile(DIR => $dir);
$tmpfile->spurt(encode_json($results))->chmod(0644)->move_to(path($dir, 'details-' . $self->name . '.json'));
$tmpfile->spew(encode_json($results))->chmod(0644)->move_to(path($dir, 'details-' . $self->name . '.json'));
}

# incorporate textual step data into details JSON
Expand Down Expand Up @@ -232,7 +232,7 @@ sub finalize_results {
# replace file contents on disk using a temp file to preserve old file if something goes wrong
my $new_file_contents = encode_json($results);
my $tmpfile = tempfile(DIR => $file->dirname);
$tmpfile->spurt($new_file_contents);
$tmpfile->spew($new_file_contents);
$tmpfile->chmod(0644)->move_to($file);

# cleanup incorporated files
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/Schema/ResultSet/Assets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ sub status {
# ensure parent directory exists
$cache_file->dirname->make_path();
# write JSON file, replacing possibly existing one
$cache_file->spurt(
$cache_file->spew(
encode_json(
{
data => \@assets,
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenQA/Schema/ResultSet/Jobs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ sub _search_modules ($self, $module_re) {
my $stderr;
IPC::Run::run(\@cmd, \undef, \$stdout, \$stderr);
next if $stderr;
push(@results, map { $_ =~ s/\..*$//; basename $_} split(/\n/, $stdout));
push(@results, map { $_ =~ s/\..*$//; basename $_ } split(/\n/, $stdout));
}
return \@results;
}
Expand Down
2 changes: 1 addition & 1 deletion script/modify_needle
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ for my $needle (@ARGV) {
}
$info->{tags} = [sort keys %tags];
next unless $changed;
path($needle)->spurt(Cpanel::JSON::XS->new->pretty->encode($info));
path($needle)->spew(Cpanel::JSON::XS->new->pretty->encode($info));
}
2 changes: 1 addition & 1 deletion t/03-auth.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ OpenQA::Test::Database->new->create;

sub test_auth_method_startup ($auth, @options) {
my @conf = ("[auth]\n", "method = \t $auth \t\n", "[openid]\n", "httpsonly = 0\n");
$tempdir->child('openqa.ini')->spurt(@conf, @options);
$tempdir->child('openqa.ini')->spew(join('', @conf, @options));
my $t = Test::Mojo->new('OpenQA::WebAPI');
is $t->app->config->{auth}->{method}, $auth, "started successfully with auth $auth";
$t->get_ok('/login' => {Referer => 'http://open.qa/tests/42'});
Expand Down
8 changes: 4 additions & 4 deletions t/10-jobs-results.t
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ subtest 'create result dir, delete results' => sub {
my $ulogs_dir = path($result_dir, 'ulogs')->make_path;
my $file_content = Encode::encode('UTF-8', 'this text is 26 bytes long');
my @fake_results = qw(autoinst-log.txt video.ogv video.webm video_time.vtt serial0.txt serial_terminal.txt);
path($result_dir, $_)->spurt($file_content) for @fake_results;
path($result_dir, $_)->spew($file_content) for @fake_results;
my @ulogs = qw(bar.log foo.log);
path($ulogs_dir, $_)->spurt($file_content) for @ulogs;
path($ulogs_dir, $_)->spew($file_content) for @ulogs;
is_deeply $job->test_uploadlog_list, \@ulogs, 'logs linked to job as uploaded';
is_deeply $job->video_file_paths->map('basename')->to_array, [qw(video.ogv video.webm)], 'all videos considered';

Expand All @@ -102,7 +102,7 @@ subtest 'create result dir, delete results' => sub {
$job = $jobs->create({TEST => 'delete-logs', logs_present => 1, result_size => $initially_assumed_result_size});
$job->discard_changes;
ok -d ($result_dir = path($job->create_result_dir)), 'result directory created';
path($result_dir, $_)->spurt($file_content) for @fake_results;
path($result_dir, $_)->spew($file_content) for @fake_results;
symlink(path($result_dir, 'video.webm'), my $symlink = path($result_dir, 'video.mkv'))
or die "Unable to create symlink: $!";
my $symlink_size = $symlink->lstat->size;
Expand Down Expand Up @@ -136,7 +136,7 @@ subtest 'create result dir, delete results' => sub {
my $result_dir = path($job->result_dir);
like $result_dir, qr|$base_dir/openqa/testresults/\d{5}/\d{8}-to-be-archived|,
'normal result directory returned by default';
$result_dir->child('subdir')->make_path->child('some-file')->spurt('test');
$result_dir->child('subdir')->make_path->child('some-file')->spew('test');
$job->update({state => DONE});
$job->discard_changes;

Expand Down
2 changes: 1 addition & 1 deletion t/10-jobs.t
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ subtest 'carry over, including soft-fails' => sub {
my $last_good_vars = decode_json $last_good_path->slurp;
$last_good_vars->{TEST_GIT_HASH} = 'UNKNOWN';
$last_good_vars->{NEEDLES_GIT_HASH} = 'UNKNOWN';
$last_good_path->spurt(encode_json $last_good_vars);
$last_good_path->spew(encode_json $last_good_vars);
ok my $inv = $job->investigate, 'job can provide investigation details';
is ref(my $last_good = $inv->{last_good}), 'HASH', 'previous job identified as last good and it is a hash';
is $last_good->{link}, '/tests/99997', 'last_good hash has the correct link';
Expand Down
4 changes: 2 additions & 2 deletions t/14-grutasks.t
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ subtest 'finalize job results' => sub {
$minion->reset({all => 1});

subtest 'successful run triggered via $job->done' => sub {
my $a_txt = path($job->result_dir, 'a-0.txt')->spurt('Foo');
my $a_txt = path($job->result_dir, 'a-0.txt')->spew('Foo');
my $b_txt = path('t/data/14-module-b.txt')->copy_to($job->result_dir . '/b-0.txt');
$job->done;
$_->discard_changes for ($job, $child_job);
Expand Down Expand Up @@ -783,7 +783,7 @@ subtest 'finalize job results' => sub {

subtest 'unsuccessful run where not all modules can be finalized' => sub {
$minion->reset({all => 1});
$a_details->spurt('Not {} valid [] JSON');
$a_details->spew('Not {} valid [] JSON');
combined_like { run_gru_job($app, finalize_job_results => [$job->id]) }
qr/error: Finalizing.*failed/, 'error in finalizing handled';
my $minion_jobs = $minion->jobs({tasks => ['finalize_job_results']});
Expand Down
10 changes: 5 additions & 5 deletions t/15-assets.t
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ is $jobA->done(result => PASSED), USER_RESTARTED, 'jobA job set to done (result
is $cloneA->done(result => PASSED), PASSED, 'cloneA job set to done';

# register asset and mark as created by cloneA
path($japath)->spurt('foobar');
path($japath)->spew('foobar');
my $ja = $schema->resultset('Assets')->create({name => $janame, type => 'hdd'});
$schema->resultset('JobsAssets')->create({job_id => $cloneA->id, asset_id => $ja->id, created_by => 1});

Expand All @@ -181,14 +181,14 @@ my $repopath = path(assetdir, 'repo', 'tmprepo');
remove_tree($repopath);
# create some test content to test nested dir size discovery
my $testdir = path($repopath, 'testdir')->make_path;
path($repopath, 'testfile')->spurt('foobar');
path($repopath, 'testfile2')->spurt('meep');
path($repopath, 'testfile')->spew('foobar');
path($repopath, 'testfile2')->spew('meep');
my $repo = $schema->resultset('Assets')->create({name => 'tmprepo', type => 'repo'});

# create a test 'fixed' asset
my $fixed_dir = path(assetdir, 'hdd', 'fixed')->make_path;
my $fixedpath = path($fixed_dir, 'fixed.img');
$fixedpath->spurt('');
$fixedpath->spew('');
my $fixed = $schema->resultset('Assets')->create({name => 'fixed.img', type => 'hdd'});

# test is_fixed
Expand Down Expand Up @@ -335,7 +335,7 @@ subtest 'check for missing assets' => sub {
->create({type => 'hdd', name => sprintf("%08d-disk_from_parent", $parent_job->id), size => 0});
@assets = sort map { $_->asset->name } $job_with_2_assets->jobs_assets->all;
$missing_assets = $job_with_2_assets->missing_assets;
is_deeply $missing_assets , ['hdd/non_existent'],
is_deeply $missing_assets, ['hdd/non_existent'],
'private assets correctly detected also when other asset is missing'
or diag explain $missing_assets;
};
Expand Down
18 changes: 9 additions & 9 deletions t/16-utils.t
Original file line number Diff line number Diff line change
Expand Up @@ -252,28 +252,28 @@ ac6dd8d4475f8b7e0d683e64ff49d6d96151fb76 refs/tags/4.3
EOT

# Create a valid Changelog and check if result is the expected one
$changelog_file->spurt($changelog_content);
$changelog_file->spew($changelog_content);
is detect_current_version($changelog_dir), '4.4.1494239160.9869466', 'Detect current version from Changelog format';
like detect_current_version($changelog_dir), qr/(\d+\.\d+\.\d+\.$sha_regex)/, "Version scheme matches";
$changelog_file->spurt("- Update to version 4.4.1494239160.9869466:\n- Update to version 4.4.1489864450.251306a:");
$changelog_file->spew("- Update to version 4.4.1494239160.9869466:\n- Update to version 4.4.1489864450.251306a:");
is detect_current_version($changelog_dir), '4.4.1494239160.9869466', 'Pick latest version detected in Changelog';

# Failure detection case for Changelog file
$changelog_file->spurt("* Do job cleanup even in case of api failure");
$changelog_file->spew("* Do job cleanup even in case of api failure");
is detect_current_version($changelog_dir), undef, 'Invalid Changelog return no version';
$changelog_file->spurt("Update to version 3a2.d2d.2ad.9869466:");
$changelog_file->spew("Update to version 3a2.d2d.2ad.9869466:");
is detect_current_version($changelog_dir), undef, 'Invalid versions in Changelog returns undef';

# Create a valid Git repository where we can fetch the exact version.
$head_file->spurt("7223a2408120127ad2d82d71ef1893bbe02ad8aa");
$refs_file->spurt($refs_content);
$head_file->spew("7223a2408120127ad2d82d71ef1893bbe02ad8aa");
$refs_file->spew($refs_content);
is detect_current_version($git_dir), 'git-4.3-7223a240', 'detect current version from Git repository';
like detect_current_version($git_dir), qr/(git\-\d+\.\d+\-$sha_regex)/, 'Git version scheme matches';

# If refs file can't be found or there is no tag present, version should be undef
unlink($refs_file);
is detect_current_version($git_dir), undef, "Git ref file missing, version is undef";
$refs_file->spurt("ac6dd8d4475f8b7e0d683e64ff49d6d96151fb76");
$refs_file->spew("ac6dd8d4475f8b7e0d683e64ff49d6d96151fb76");
is detect_current_version($git_dir), undef, "Git ref file shows no tag, version is undef";
};

Expand Down Expand Up @@ -399,10 +399,10 @@ subtest 'project directory functions' => sub {
is gitrepodir(distri => $distri), '', 'empty when .git is missing';
$mocked_git->make_path;
$mocked_git->child('config')
->spurt(qq{[remote "origin"]\n url = git\@github.com:fakerepo/os-autoinst-distri-opensuse.git});
->spew(qq{[remote "origin"]\n url = git\@github.com:fakerepo/os-autoinst-distri-opensuse.git});
is gitrepodir(distri => $distri) =~ /github\.com.+os-autoinst-distri-opensuse\/commit/, 1, 'correct git url';
$mocked_git->child('config')
->spurt(qq{[remote "origin"]\n url = https://github.com/fakerepo/os-autoinst-distri-opensuse.git});
->spew(qq{[remote "origin"]\n url = https://github.com/fakerepo/os-autoinst-distri-opensuse.git});
is gitrepodir(distri => $distri) =~ /github\.com.+os-autoinst-distri-opensuse\/commit/, 1, 'correct git url';
};
subtest 'custom OPENQA_BASEDIR and OPENQA_SHAREDIR' => sub {
Expand Down
2 changes: 1 addition & 1 deletion t/22-dashboard.t
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ subtest 'Changelog' => sub {
$t->get_ok('/changelog')->status_is(200)->content_like(qr/No changelog available/)
->content_unlike(qr/Custom changelog works/);
my $changelog = tempfile;
$changelog->spurt('Custom changelog works!');
$changelog->spew('Custom changelog works!');
$global_cfg->{changelog_file} = $changelog->to_string;
$t->get_ok('/changelog')->status_is(200)->content_like(qr/Custom changelog works/);
};
Expand Down
2 changes: 1 addition & 1 deletion t/23-amqp.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OpenQA::Test::Database->new->create(fixtures_glob => '01-jobs.pl 03-users.pl 05-
# this test also serves to test plugin loading via config file
my $conf = "[global]\nplugins=AMQP\n[amqp]\npublish_attempts = 2\npublish_retry_delay = 0\n";
my $tempdir = tempdir;
path($ENV{OPENQA_CONFIG} = $tempdir)->make_path->child('openqa.ini')->spurt($conf);
path($ENV{OPENQA_CONFIG} = $tempdir)->make_path->child('openqa.ini')->spew($conf);

my $t = client(Test::Mojo->new('OpenQA::WebAPI'));
my $app = $t->app;
Expand Down

0 comments on commit d2a7168

Please sign in to comment.