Skip to content

Commit 1873c85

Browse files
committed
Fixes #448
Added skip options to some profiles as they are available on v12 and up. Some profiles have added properties in v12, those needed to be changes so the tested properties are available on both versions.
1 parent 94a2fa6 commit 1873c85

1 file changed

Lines changed: 122 additions & 13 deletions

File tree

test/functional/tm/ltm/test_profile.py

Lines changed: 122 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414
#
1515

16+
import pytest
17+
1618
TESTDESCRIPTION = "TESTDESCRIPTION"
1719

1820
end_lst = ['Certificate_Authoritys', 'Classifications', 'Client_Ldaps',
@@ -267,8 +269,30 @@ def test_CURDL(self, request, bigip):
267269
class TestDnsLogging(object):
268270
def test_CURDL(self, request, bigip):
269271
dnslog = HelperTest(end_lst, 8)
270-
dnslog.test_CURDL(
271-
request, bigip, logPublisher='/Common/local-db-publisher')
272+
273+
# Testing create
274+
275+
dns1, dnshc = dnslog.setup_test(
276+
request, bigip,
277+
logPublisher='/Common/local-db-publisher')
278+
assert dns1.name == 'test.dns_logging'
279+
del dnshc
280+
281+
# Testing update
282+
assert dns1.enableQueryLogging == 'yes'
283+
dns1.enableQueryLogging = 'no'
284+
dns1.update()
285+
assert dns1.enableQueryLogging == 'no'
286+
287+
# Testing refresh
288+
dns1.enableQueryLogging = 'yes'
289+
dns1.refresh()
290+
assert dns1.enableQueryLogging == 'no'
291+
292+
# Testing load
293+
dns2 = bigip.ltm.profile.dns_loggings.dns_logging.load(
294+
partition='Common', name='test.dns_logging')
295+
assert dns1.selfLink == dns2.selfLink
272296

273297
# End Dns Logging test
274298

@@ -300,7 +324,28 @@ def test_CURDL(self, request, bigip):
300324
class TestFix(object):
301325
def test_CURDL(self, request, bigip):
302326
fix = HelperTest(end_lst, 11)
303-
fix.test_CURDL(request, bigip)
327+
328+
# Testing create
329+
330+
fix1, fixc = fix.setup_test(request, bigip)
331+
assert fix1.name == 'test.fix'
332+
del fixc
333+
334+
# Testing update
335+
assert fix1.quickParsing == 'false'
336+
fix1.quickParsing = 'true'
337+
fix1.update()
338+
assert fix1.quickParsing == 'true'
339+
340+
# Testing refresh
341+
fix1.quickParsing = 'false'
342+
fix1.refresh()
343+
assert fix1.quickParsing == 'true'
344+
345+
# Testing load
346+
fix2 = bigip.ltm.profile.fixs.fix.load(
347+
partition='Common', name='test.fix')
348+
assert fix1.selfLink == fix2.selfLink
304349

305350

306351
# End Fix tests
@@ -402,7 +447,8 @@ def test_CURDL(self, request, bigip):
402447

403448
# Begin IIOP tests
404449

405-
450+
@pytest.mark.skipif(pytest.config.getoption('--release') != '12.0.0',
451+
reason='Needs v12 TMOS to pass')
406452
class TestIiop(object):
407453
def test_CURDL(self, request, bigip):
408454
iiop = HelperTest(end_lst, 19)
@@ -435,11 +481,31 @@ def test_CURDL(self, request, bigip):
435481

436482
# Begin Mssql tests
437483

438-
439484
class TestMssql(object):
440485
def test_CURDL(self, request, bigip):
441486
mssql = HelperTest(end_lst, 22)
442-
mssql.test_CURDL(request, bigip)
487+
488+
# Testing create
489+
490+
mssql1, mssqlc = mssql.setup_test(request, bigip)
491+
assert mssql1.name == 'test.mssql'
492+
del mssqlc
493+
494+
# Testing update
495+
assert mssql1.userCanWriteByDefault == 'true'
496+
mssql1.userCanWriteByDefault = 'false'
497+
mssql1.update()
498+
assert mssql1.userCanWriteByDefault == 'false'
499+
500+
# Testing refresh
501+
mssql1.userCanWriteByDefault = 'true'
502+
mssql1.refresh()
503+
assert mssql1.userCanWriteByDefault == 'false'
504+
505+
# Testing load
506+
mssql2 = bigip.ltm.profile.mssqls.mssql.load(
507+
partition='Common', name='test.mssql')
508+
assert mssql1.selfLink == mssql2.selfLink
443509

444510

445511
# End Mssql tests
@@ -473,11 +539,32 @@ def test_CURDL(self, request, bigip):
473539
dns = setup_dns_resolver(request, bigip, 'test_resolv')
474540

475541
# Test CURDL
476-
http2 = HelperTest(end_lst, 24)
477-
http2.test_CURDL(request, bigip,
478-
dnsResolver=dns.name,
479-
trustedCa='/Common/ca-bundle.crt',
480-
useProxyServer='disabled')
542+
ocsp = HelperTest(end_lst, 24)
543+
544+
# Testing create
545+
ocsp1, ocsphc = ocsp.setup_test(
546+
request, bigip, dnsResolver=dns.name,
547+
trustedCa='/Common/ca-bundle.crt',
548+
useProxyServer='disabled')
549+
550+
assert ocsp1.name == 'test.ocsp_stapling_params'
551+
del ocsphc
552+
553+
# Testing update
554+
ocsp1.cacheErrorTimeout = 3000
555+
ocsp1.update()
556+
assert ocsp1.cacheErrorTimeout == 3000
557+
558+
# Testing refresh
559+
ocsp1.cacheErrorTimeout = 30
560+
ocsp1.refresh()
561+
assert ocsp1.cacheErrorTimeout == 3000
562+
563+
# Testing load
564+
ocsp2 = bigip.ltm.profile.ocsp_stapling_params_s
565+
ocsp2.ocsp_stapling_params.load(
566+
partition='Common', name='test.ocsp_stapling_params')
567+
assert ocsp1.selfLink == ocsp2.selfLink
481568

482569

483570
# End Ocsp Stapling Params tests
@@ -521,7 +608,28 @@ def test_CURDL(self, request, bigip):
521608
class TestQoe(object):
522609
def test_CURDL(self, request, bigip):
523610
qoe = HelperTest(end_lst, 28)
524-
qoe.test_CURDL(request, bigip)
611+
612+
# Testing create
613+
614+
qoe1, qoec = qoe.setup_test(request, bigip)
615+
assert qoe1.name == 'test.qoe'
616+
del qoec
617+
618+
# Testing update
619+
assert qoe1.video == 'false'
620+
qoe1.video = 'true'
621+
qoe1.update()
622+
assert qoe1.video == 'true'
623+
624+
# Testing refresh
625+
qoe1.video = 'false'
626+
qoe1.refresh()
627+
assert qoe1.video == 'true'
628+
629+
# Testing load
630+
qoe2 = bigip.ltm.profile.qoes.qoe.load(
631+
partition='Common', name='test.qoe')
632+
assert qoe1.selfLink == qoe2.selfLink
525633

526634

527635
# End Qoe tests
@@ -787,7 +895,8 @@ def test_CURDL(self, request, bigip):
787895

788896
# Begin Tftp tests
789897

790-
898+
@pytest.mark.skipif(pytest.config.getoption('--release') != '12.0.0',
899+
reason='Needs v12 TMOS to pass')
791900
class TestTftp(object):
792901
def test_CURDL(self, request, bigip):
793902
tftp = HelperTest(end_lst, 45)

0 commit comments

Comments
 (0)