5 Usage: blackbox_supported_features.sh PREFIX
13 DBPATH
=$PREFIX/supported-features
17 . $
(dirname $0)/..
/..
/..
/testprogs
/blackbox
/subunit.sh
20 if [ -x "$BINDIR/ldbmodify" ]; then
21 ldbmodify
="$BINDIR/ldbmodify"
25 if [ -x "$BINDIR/ldbdel" ]; then
26 ldbdel
="$BINDIR/ldbdel"
30 if [ -x "$BINDIR/ldbsearch" ]; then
31 ldbsearch
="$BINDIR/ldbsearch"
34 testit
"provision" $PYTHON $BINDIR/samba-tool domain provision \
35 --domain=FOO
--realm=foo.example.com \
36 --targetdir=$DBPATH --use-ntvfs
38 testit
"add-compatible-feature" $ldbmodify \
39 -H tdb
://$DBPATH/private
/sam.ldb
<<EOF
42 add: compatibleFeatures
43 compatibleFeatures: non-existent-feature
48 # The non-existent feature is not compatible with this version, so it
49 # should not be listed in compatibleFeatures even though we tried to
54 $ldbsearch -H tdb
://$DBPATH/private
/sam.ldb \
55 -s base
-b "$1" "$2" |
59 testit_expect_failure
"find-compatible-feature" \
60 ldb_search_fail
'@SAMBA_DSDB' 'compatibleFeatures' non-existent-feature
62 # just make sure the thing we're using is normally findable
63 testit
"find-test-feature" \
64 $ldbsearch -H tdb
://$DBPATH/private
/sam.ldb \
65 -b 'CN=LostAndFound,DC=foo,DC=example,DC=com'
67 testit
"add-required-feature" $ldbmodify \
68 -H tdb
://$DBPATH/private
/sam.ldb
<<EOF
72 requiredFeatures: futuristic-feature
77 # The futuristic-feature is not implemented in this version, but it is
78 # required by this database. A search for anything should fail.
80 testit_expect_failure
"find-required-feature" \
81 $ldbsearch -H tdb
://$DBPATH/private
/sam.ldb \
82 -b 'CN=LostAndFound,DC=foo,DC=example,DC=com'