File: create-delete

package info (click to toggle)
ikiwiki-hosting 0.20180719-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 948 kB
  • sloc: perl: 5,395; sh: 183; ansic: 169; makefile: 61
file content (25 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl

use warnings;
use strict;

use Cwd qw(getcwd);
#use File::Slurp;
use File::stat;
use Test::More;

# This assumes that ikiwiki-hosting.conf still has prefix_e=example.com.
ok(! system(qw(ikisite create foo.example.com --admin=root@localhost)));
ok(-d '/home/e-foo');
ok(-f '/home/e-foo/ikiwiki.setup');
ok(-f '/home/e-foo/public_html/ikiwiki/index.html');

my $uid = `id -u e-foo`;
chomp $uid;
my $stat = stat('/home/e-foo');
is($stat->uid, $uid);

ok(! system(qw(ikisite delete foo.example.com)));
ok(! -e '/home/e-foo');

done_testing;