initial commit of file from CVS for e-smith-test on Wed 12 Jul 09:10:30 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:10:30 +01:00
parent 54e4f39dbc
commit b7c1628cf6
18 changed files with 2081 additions and 2 deletions

View File

@@ -0,0 +1,72 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#----------------------------------------------------------------------
=head1 NAME
testing-conf -- configure testing service
=head1 DESCRIPTION
This action sets up the testing service when you first install
e-smith-test, setting the "destruction" property to 0 (non-destructive).
It is a no-op if the "destruction" property is already defined.
=begin testing
use esmith::ConfigDB;
$ENV{ESMITH_CONFIG_DB} = "00e-smith-test/configuration";
unlink $ENV{ESMITH_CONFIG_DB};
ok(my $conf = esmith::ConfigDB->create(), "Create new config file");
ok(my $test_service = $conf->new_record('testing', {type => 'service'}),
"Create new record for testing service");
isa_ok($test_service, 'esmith::DB::Record');
ok(not(defined($test_service->prop('destruction'))),
"Testing should be absent before we run");
is(system("$^X $Original_File"), 0, "System command returned 0");
$conf = esmith::ConfigDB->open();
$test_service = $conf->get('testing');
ok(defined($test_service->prop('destruction')), "Destruction is now defined");
$test_service->set_prop('destruction', 1);
is(system("$^X $Original_File"), 0, "System command returned 0");
$conf = esmith::ConfigDB->open();
$test_service = $conf->get('testing');
is($test_service->prop('destruction'), 1,
"Destruction is left alone if already defined");
$test_service->set_prop('destruction', 0);
is(system("$^X $Original_File"), 0, "System command returned 0");
$conf = esmith::ConfigDB->open();
$test_service = $conf->get('testing');
is($test_service->prop('destruction'), 0,
"Destruction is left alone if already defined, even if 0");
=end testing
=cut
use strict;
use esmith::ConfigDB;
my $conf = esmith::ConfigDB->open()
or die "Configuration database does not exist";
if (my $test_service = $conf->get('testing')
|| $conf->new_record('testing', { type => 'service'} ))
{
unless (defined $test_service->prop('destruction'))
{
$test_service->set_prop('destruction', 0);
}
}
exit 0;

View File

View File

@@ -0,0 +1,20 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#----------------------------------------------------------------------
use strict;
use Test::More tests => 8;
require_ok("Test::Harness");
require_ok("Test::More");
require_ok("Test::Inline");
require_ok("WWW::Automate");
require_ok("Test::Simple");
require_ok("esmith::TestUtils");
ok(-e "/etc/e-smith/tests", "Test directory exists");
ok(-d "/etc/e-smith/tests", "Test directory is a directory");

View File

@@ -0,0 +1,82 @@
# DO NOT MODIFY THIS FILE.
# This file is automatically maintained by the Mitel Networks SME Server
# configuration software. Manually editing this file may put your
# system in an unknown state.
#
# updated: Tue Feb 26 13:56:13 2002
Bart.Simpson=pseudonym|Account|bart
Bart_Simpson=pseudonym|Account|bart
Global=system
Primary=system
adm=system|Gid|4|Uid|3
admin=system|Gid|101|Uid|101
alias=system|Gid|400|Uid|400
apache=existing|Gid|48|Uid|48
bart=user|FirstName|Bart|LastName|Simpson
bin=system|Gid|1|Uid|1
cdrom=system
cgi-bin=url
console=system
daemon=system|Gid|2|Uid|2
dip=system|Gid|40
disk=system|Gid|6
dns=existing|Gid|53|Uid|53
e-smith-manager=url
e-smith-password=url
everyone=pseudonym|Account|shared|Visible|internal
floppy=system|Gid|19
ftp=system|Gid|50|Uid|14
games=system|Gid|20|Uid|12
global=system
gopher=system|Gid|30|Uid|13
halt=system
homes=system
kmem=system|Gid|9
ldap=existing|Gid|55|Uid|55
lp=system|Gid|7|Uid|4
mail=system|Gid|12|Uid|8
mailer-daemon=pseudonym|Account|admin
man=system|Gid|15
mem=system|Gid|8
mysql=existing|Gid|27|Uid|27
named=existing|Gid|25|Uid|25
netlogon=netlogon|Comment|placeholder for netlogon share
news=system|Gid|13|Uid|9
nobody=system|Gid|99|Uid|99
nofiles=system|Gid|400
operator=system|Gid|0|Uid|11
postgres=system
postmaster=pseudonym|Account|admin
primary=system
printers=system
public=system|Gid|103|Uid|102
qmail=system|Gid|401
qmaild=system|Gid|400|Uid|401
qmaill=system|Gid|400|Uid|402
qmailp=system|Gid|400|Uid|403
qmailq=system|Gid|401|Uid|404
qmailr=system|Gid|401|Uid|405
qmails=system|Gid|401|Uid|406
qmailscan=existing|Gid|407|Uid|407
root=system|Gid|0|Uid|0
schwern=user|Uid|500|Gid|501|FirstName|Michael|LastName|Schwern
server-manager=url
server-manual=url
shared=system|Gid|500|Visible|internal
shutdown=system
simpsons=group|Description|bar|Gid|5005|Members|bart,lisa,homer|Uid|5005
slocate=system
somegroup=group|Gid|42
squid=system|Gid|23|Uid|23
sync=system
sys=system|Gid|3
trend=existing|Gid|408|Uid|408
tty=system|Gid|5
user-password=url
users=system|Gid|100
utmp=system|Gid|22
uucp=system|Gid|14|Uid|10
webmail=url
wheel=system|Gid|10
www=system|Gid|102|Uid|100
wwwpublic=system

View File

@@ -0,0 +1,102 @@
# DO NOT MODIFY THIS FILE.
# This file is automatically maintained by the Mitel Networks SME Server
# configuration software. Manually editing this file may put your
# system in an unknown state.
#=
#DomainName=e-smith.com
AccessType=dedicated
ActiveAccounts=0
AdminEmail=
ConsoleMode=login
ContactEmail=
ContactName=
ContactOrg=
DialupConnOffice=long
DialupConnOutside=long
DialupConnWeekend=long
DialupFreqOffice=every15min
DialupFreqOutside=everyhour
DialupFreqWeekend=everyhour
DialupModemDevice=/dev/ttyS1
DialupPhoneNumber=
DialupUserAccount=useraccount
DialupUserPassword=userpassword
DomainName=e-smith.com
DynDnsAccount=dnsaccount
DynDnsPassword=dnspassword
DynDnsService=off
EmailUnknownUser=return
EthernetDriver1=pcnet32
EthernetDriver2=unknown
ExternalDHCP=off
ExternalNetmask=255.255.255.0
GatewayIP=192.168.16.1
LocalIP=192.168.16.228
LocalNetmask=255.255.255.0
MinUid=5000
PasswordSet=yes
PreviousConfiguration=/home/e-smith/db/configuration.previous
SMTPSmartHost=
SambaDomainMaster=no
SambaServerName=pretz
SambaWorkgroup=mitel-networks
ServiceAccountId=
ServiceDomainName=
ServiceTargetIP=
SquidParent=
SquidParentPort=
StatusReports=off
SystemMode=serveronly
SystemName=pretz
TimeZone=US/Eastern
UnsavedChanges=yes
atalk=service|InitscriptOrder|91|status|enabled
auth=service|access|public|status|enabled
blades=service|Host|service.e-smith.com|status|enabled
bootstrap-console=service|InitscriptOrder|35|Run|no|status|enabled
branding=service|modified|000000000000|status|enabled
crond=service|InitscriptOrder|40|status|enabled
ctrlaltdel=service|status|enabled
dhcpd=service|InitscriptOrder|65|end|192.168.16.250|start|192.168.16.65|status|disabled
diald=service|InitscriptOrder|57|status|disabled
fetchmail=service|FreqOffice|every5min|FreqOutside|every30min|FreqWeekend|never|Method|standard|SecondaryMailAccount|popaccount|SecondaryMailPassword|poppassword|SecondaryMailServer|mail.myisp.xxx|status|disabled
flexbackup=backupservice|erase_rewind_only|true
ftp=service|access|private|accessLimits|off|status|enabled
hdparm=service|InitscriptOrder|40|status|disabled
horde=service|status|disabled
httpd-admin=service|InitscriptOrder|86|status|enabled
httpd-e-smith=service|InitscriptOrder|85|access|private|status|enabled
imap=service|access|private|status|enabled
imp=service|status|disabled
ippp=service|InitscriptOrder|55|status|enabled
ipsec=service|InitscriptOrder|90|PubKey|0sAQOoIKaOMuDqSdCZJXgv9QI86DAuAwbbvn8uoKn2lRQ9ZVPTn9Ow5znhuw/GopsYD2eujhtvkQo7fszAhWbEpn+lW2LzLCbZYaDov7j8Q9CpeJSVgeuzaBcw3OenSL3ltTwWWtG0pvyaYsfepNqVYvo64YVmrxo0O7dCECySMVBZkQ==|status|disabled
isdn=service|Protocol|2|UseSyncPPP|yes|status|disabled
keytable=service|InitscriptOrder|25|status|enabled
ldap=service|InitscriptOrder|80|access|private|defaultCity|Ottawa|defaultCompany|XYZ Corporation|defaultDepartment|Main|defaultPhoneNumber|555-5555|defaultStreet|123 Main Street|status|enabled
lilo=service|AddressMode|linear
local=service|InitscriptOrder|99|status|enabled
lpd=service|InitscriptOrder|60|status|enabled
mariadb=service|InitscriptOrder|90|status|enabled
masq=service|InitscriptOrder|06|Logging|none|Stealth|no|status|disabled
modSSL=service|status|enabled
mysql.init=service|InitscriptOrder|99|status|enabled
named=service|chroot|yes|status|enabled
network=service|InitscriptOrder|10|status|enabled
ntpd=service|InitscriptOrder|55|status|disabled
php=service|status|enabled
popd=service|access|private|status|enabled
pppoe=service|DemandIdleTime|no|InitscriptOrder|57|SynchronousPPP|no|status|disabled
pptpd=service|sessions|10|status|disabled
qmail=service|InitscriptOrder|80|status|enabled
random=service|InitscriptOrder|20|status|enabled
rsyslog=service|InitscriptOrder|05|status|enabled
scanner=service|ScannerFns|iscan|UpdateTime|1:14|scanMail|yes|status|enabled
smb=service|InitscriptOrder|91|RoamingProfiles|no|status|enabled
smtpfwdd=service|InitscriptOrder|81|status|enabled
squid=service|InitscriptOrder|90|status|enabled
sshd=service|InitscriptOrder|85|PasswordAuthentication|yes|PermitRootLogin|yes|access|private|status|enabled
sync=service|Host|service.e-smith.com|LastId|0|SuccessId|0|SyncFrequency|1|SyncMinute|57|status|disabled
telnet=service|access|private|status|disabled
testing=service|destruction|1
wibble=42
xinetd=service|InitscriptOrder|50|status|enabled