summaryrefslogtreecommitdiffstats
path: root/config-db/t/11-export.t
diff options
context:
space:
mode:
authorOliver Tappe2007-12-27 23:35:57 +0100
committerOliver Tappe2007-12-27 23:35:57 +0100
commit230200926c8332c8b6d16e5f4146b34ed8c403bb (patch)
treea3ebbb270e815b5125028fe94072511f94d1c2b8 /config-db/t/11-export.t
parent* Changed naming scheme for exports from <vendor-os>:<type> to (diff)
downloadcore-230200926c8332c8b6d16e5f4146b34ed8c403bb.tar.gz
core-230200926c8332c8b6d16e5f4146b34ed8c403bb.tar.xz
core-230200926c8332c8b6d16e5f4146b34ed8c403bb.zip
* added more tests for basic DB-features: group, global_info and
client_system_ref git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1435 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/t/11-export.t')
-rw-r--r--config-db/t/11-export.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/config-db/t/11-export.t b/config-db/t/11-export.t
index b122ffdd..96fad00b 100644
--- a/config-db/t/11-export.t
+++ b/config-db/t/11-export.t
@@ -32,6 +32,16 @@ is(
'no export yet (array context)'
);
+is(
+ my @exportIDs = $configDB->fetchExportIDsOfVendorOS(1), 0,
+ 'vendor-OS 1 has no export IDs yet'
+);
+
+is(
+ @exportIDs = $configDB->fetchExportIDsOfVendorOS(2), 0,
+ 'vendor-OS 2 has no export IDs yet'
+);
+
my $inExport1 = {
'name' => 'exp-1',
'type' => 'nfs',
@@ -107,6 +117,19 @@ is($export1->{port}, undef, 'export 1 - port');
is($export1->{server_ip}, undef, 'export 1 - server_ip');
is($export1->{uri}, undef, 'export 1 - uri');
+is(
+ @exportIDs = sort( { $a <=> $b } $configDB->fetchExportIDsOfVendorOS(1)),
+ 2, 'vendor-OS 1 has two export IDs'
+);
+is($exportIDs[0], 1, 'first export ID of vendor-OS 1 (1)');
+is($exportIDs[1], 2, 'second export ID of vendor-OS 1 (2)');
+
+is(
+ @exportIDs = sort( { $a <=> $b } $configDB->fetchExportIDsOfVendorOS(2)),
+ 1, 'vendor-OS 2 has one export IDs'
+);
+is($exportIDs[0], 3, 'first export ID of vendor-OS 2 (3)');
+
# fetch exports 3 & 1 by id
ok(
my @exports3And1 = $configDB->fetchExportByID([3, 1]),