|
13 | 13 | # limitations under the License. |
14 | 14 | # |
15 | 15 |
|
| 16 | +import pytest |
| 17 | + |
16 | 18 | TESTDESCRIPTION = "TESTDESCRIPTION" |
17 | 19 |
|
18 | 20 | end_lst = ['Certificate_Authoritys', 'Classifications', 'Client_Ldaps', |
@@ -267,8 +269,30 @@ def test_CURDL(self, request, bigip): |
267 | 269 | class TestDnsLogging(object): |
268 | 270 | def test_CURDL(self, request, bigip): |
269 | 271 | 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 |
272 | 296 |
|
273 | 297 | # End Dns Logging test |
274 | 298 |
|
@@ -300,7 +324,28 @@ def test_CURDL(self, request, bigip): |
300 | 324 | class TestFix(object): |
301 | 325 | def test_CURDL(self, request, bigip): |
302 | 326 | 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 |
304 | 349 |
|
305 | 350 |
|
306 | 351 | # End Fix tests |
@@ -402,7 +447,8 @@ def test_CURDL(self, request, bigip): |
402 | 447 |
|
403 | 448 | # Begin IIOP tests |
404 | 449 |
|
405 | | - |
| 450 | +@pytest.mark.skipif(pytest.config.getoption('--release') != '12.0.0', |
| 451 | + reason='Needs v12 TMOS to pass') |
406 | 452 | class TestIiop(object): |
407 | 453 | def test_CURDL(self, request, bigip): |
408 | 454 | iiop = HelperTest(end_lst, 19) |
@@ -435,11 +481,31 @@ def test_CURDL(self, request, bigip): |
435 | 481 |
|
436 | 482 | # Begin Mssql tests |
437 | 483 |
|
438 | | - |
439 | 484 | class TestMssql(object): |
440 | 485 | def test_CURDL(self, request, bigip): |
441 | 486 | 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 |
443 | 509 |
|
444 | 510 |
|
445 | 511 | # End Mssql tests |
@@ -473,11 +539,32 @@ def test_CURDL(self, request, bigip): |
473 | 539 | dns = setup_dns_resolver(request, bigip, 'test_resolv') |
474 | 540 |
|
475 | 541 | # 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 |
481 | 568 |
|
482 | 569 |
|
483 | 570 | # End Ocsp Stapling Params tests |
@@ -521,7 +608,28 @@ def test_CURDL(self, request, bigip): |
521 | 608 | class TestQoe(object): |
522 | 609 | def test_CURDL(self, request, bigip): |
523 | 610 | 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 |
525 | 633 |
|
526 | 634 |
|
527 | 635 | # End Qoe tests |
@@ -787,7 +895,8 @@ def test_CURDL(self, request, bigip): |
787 | 895 |
|
788 | 896 | # Begin Tftp tests |
789 | 897 |
|
790 | | - |
| 898 | +@pytest.mark.skipif(pytest.config.getoption('--release') != '12.0.0', |
| 899 | + reason='Needs v12 TMOS to pass') |
791 | 900 | class TestTftp(object): |
792 | 901 | def test_CURDL(self, request, bigip): |
793 | 902 | tftp = HelperTest(end_lst, 45) |
|
0 commit comments