Lines Matching refs:self

238         def setUp(self):
240 pkg5unittest.SingleDepotTestCase.setUp(self)
241 self.testdata_dir = os.path.join(self.test_root, "testdata")
242 os.mkdir(self.testdata_dir)
244 self.pkg_list = []
246 self.pkg_list+= ["""
251 self.pkg_list+= ["""
256 self.pkg_list+= ["""
261 self.pkg_list+= ["""
266 self.pkg_list+= ["""
271 self.pkg_list+= ["""
277 self.pkg_list+= ["""
283 self.pkg_list+= ["""
288 self.pkg_list += ["""
293 self.pkg_list += ["""
298 self.make_misc_files(self.misc_files, prefix="testdata",
301 def test_actuators(self):
304 rurl = self.dc.get_repo_url()
305 plist = self.pkgsend_bulk(rurl, self.pkg_list)
306 self.image_create(rurl)
307 os.environ["PKG_TEST_DIR"] = self.testdata_dir
311 svcadm_output = os.path.join(self.testdata_dir,
318 self.pkg("install --parsable=0 basics@1.0")
319 self.assertEqualParsable(self.output, add_packages=[plist[0]],
323 self.pkg("verify")
325 self.file_contains(svcadm_output,
330 self.pkg("install basics@1.1")
331 self.pkg("verify")
332 self.file_contains(svcadm_output,
337 self.pkg("uninstall basics")
338 self.pkg("verify")
339 self.file_contains(svcadm_output,
347 self.pkg("install basics@1.2")
348 self.pkg("verify")
349 self.file_doesnt_exist(svcadm_output)
353 self.pkg("uninstall basics")
354 self.pkg("verify")
355 self.pkg("install basics@1.2")
356 self.pkg("verify")
357 self.file_doesnt_exist(svcadm_output)
364 self.pkg("install basics@1.3")
365 self.pkg("verify")
366 self.file_contains(svcadm_output,
368 self.file_contains(svcadm_output,
373 self.pkg("install basics@1.4")
374 self.pkg("verify")
375 self.file_contains(svcadm_output,
377 self.file_contains(svcadm_output,
384 self.pkg("install basics@1.5")
385 self.pkg("verify")
386 self.file_contains(svcadm_output,
388 self.file_contains(svcadm_output,
393 self.pkg("uninstall basics")
394 self.pkg("verify")
395 self.file_contains(svcadm_output,
404 self.pkg("install basics@1.6")
405 self.pkg("verify")
406 self.file_doesnt_exist(svcadm_output)
407 self.pkg("uninstall basics")
408 self.file_doesnt_exist(svcadm_output)
412 self.pkg("install basics@1.6")
413 self.pkg("install basics@1.7")
414 self.pkg("verify")
421 self.file_contains(svcadm_output, text)
425 self.pkg("uninstall basics")
426 self.file_contains(svcadm_output,
431 self.pkg("install basics@1.8")
432 self.pkg("verify")
434 self.file_contains(svcadm_output,
439 self.file_contains(svcadm_output, ["svcadm restart",
445 self.pkg("uninstall basics")
446 self.pkg("install --sync-actuators basics@1.1")
447 self.pkg("verify")
448 self.file_contains(svcadm_output,
453 self.pkg("uninstall basics")
454 self.pkg("install --sync-actuators --sync-actuators-timeout 20 basics@1.1")
455 self.pkg("verify")
456 self.file_contains(svcadm_output,
461 self.pkg("install --sync-actuators basics@1.4")
462 self.pkg("verify")
463 self.file_contains(svcadm_output,
465 self.file_contains(svcadm_output,
470 self.pkg("uninstall basics")
471 self.pkg("install basics@1.1")
472 self.pkg("install --sync-actuators --sync-actuators-timeout 10 basics@1.4")
473 self.pkg("verify")
474 self.file_contains(svcadm_output,
476 self.file_contains(svcadm_output,
483 self.pkg("install basics@1.9")
484 self.pkg("verify")
485 self.pkg("uninstall basics")
487 self.file_contains(svcadm_output,
492 self.file_contains(svcadm_output, ["svcadm disable -s",
497 def test_actuator_plan_display(self):
501 rurl = self.dc.get_repo_url()
502 plist = self.pkgsend_bulk(rurl, self.pkg_list)
503 self.image_create(rurl)
505 self.pkg("install -v basics@1.0")
506 self.assertTrue("restart_fmri" in self.output)
508 self.pkg("update -v basics@1.5")
509 self.assertTrue("suspend_fmri" in self.output
510 and "disable_fmri" not in self.output)
512 self.pkg("uninstall -v basics")
513 self.assertTrue("suspend_fmri" not in self.output
514 and "disable_fmri" in self.output)
516 self.pkg("install -v basics@1.5")
517 self.assertTrue("suspend_fmri" not in self.output and
518 "disable_fmri" not in self.output)
519 self.pkg("uninstall basics")
521 self.pkg("install -v basics@1.7")
522 self.assertTrue("restart_fmri" in self.output and
523 "refresh_fmri" in self.output and
524 "suspend_fmri" not in self.output and
525 "disable_fmri" not in self.output)
527 def __create_zone(self, zname, rurl):
530 zone_path = os.path.join(self.img_path(0), zname)
534 self.image_create(repourl=rurl, img_path=zimg_path)
535 self.pkg("-R {0} attach-linked -c system:{1} {2}".format(
536 self.img_path(0), zname, zimg_path))
540 def test_zone_actuators(self):
543 rurl = self.dc.get_repo_url()
544 plist = self.pkgsend_bulk(rurl, self.pkg_list)
545 self.image_create(rurl)
552 os.environ["PKG_TZR1"] = self.__create_zone("z1", rurl)
553 os.environ["PKG_TZR2"] = self.__create_zone("z2", rurl)
555 os.environ["PKG_TEST_DIR"] = self.testdata_dir
560 svcadm_output = os.path.join(self.testdata_dir,
562 zlogin_output = os.path.join(self.testdata_dir,
564 bin_zlogin = os.path.join(self.test_root,
566 bin_zoneadm = os.path.join(self.test_root,
573 self.pkg("--debug bin_zoneadm='{0}' "
577 self.file_contains(svcadm_output,
582 self.file_contains(zlogin_output,
584 self.file_doesnt_contain(zlogin_output,
586 self.file_contains(zlogin_output,
596 add file tmp/release-note-1 mode=0644 owner=root group=bin path=/usr/share/doc/release-notes/release-note-1 release-note=feature/pkg/self@0
601 add file tmp/release-note-2 mode=0644 owner=root group=root path=/usr/share/doc/release-notes/release-note-2 release-note=feature/pkg/self@1.0.1
606 add file tmp/release-note-3 mode=0644 owner=root group=root path=/usr/share/doc/release-notes/release-note-3 release-note=feature/pkg/self@1.1.1 must-display=true
611 add file tmp/release-note-4 mode=0644 owner=root group=root path=/usr/share/doc/release-notes/release-note-4 release-note=feature/pkg/self@1.1
616 add dir path=/usr mode=0755 owner=root group=root release-note=feature/pkg/self@0
630 add file tmp/release-note-6 mode=0644 owner=root group=root path=/usr/share/doc/release-notes/release-note-6 release-note=feature/pkg/self@0
644 def setUp(self):
645 pkg5unittest.SingleDepotTestCase.setUp(self)
646 self.make_misc_files(self.misc_files)
647 self.pkgsend_bulk(self.rurl, self.foo10 + self.foo11 +
648 self.foo12 + self.foo13 + self.bar10 + self.bar11 + self.baz10 +
649 self.hovercraft)
650 self.image_create(self.rurl)
652 def test_release_note_1(self):
654 self.pkg("install -v foo@1.0")
655 self.output.index("bobcats are fun!")
657 self.pkg("update -v foo@1.1")
658 self.output.index("wombats are fun!")
660 self.pkg("update foo@1.2")
661 self.output.index("no animals")
664 self.pkg("update foo@1.3")
665 assert self.output.find("no vegetables") == -1
666 self.pkg("uninstall '*'")
668 def test_release_note_2(self):
670 self.pkg("install -vn foo@1.0")
671 self.output.index("bobcats are fun!")
673 self.pkg("install foo@1.0")
675 self.output.index("Release notes")
677 self.pkg("history -n 1 -l")
678 self.output.index("Release Notes")
680 self.pkg("history -n 1 -N")
681 self.output.index("bobcats are fun!")
683 self.pkg("history -Hn 1 -o release_notes")
684 self.output.index("Yes")
685 self.pkg("uninstall '*'")
687 def test_release_note_3(self):
690 self.pkg("install bar@1.0")
691 self.pkg("install -v baz@1.0")
692 self.output.index("multi-line release notes")
693 self.output.index("should work too,")
694 self.output.index("we'll see if they do.")
696 self.pkg("update -v bar")
697 assert self.output.find("Release notes") == -1
698 self.pkg("uninstall '*'")
700 self.pkg("install bar@1.0 baz@1.0")
701 assert self.output.find("multi-line release notes") == -1
702 self.pkg("uninstall '*'")
704 def test_release_note_4(self):
706 self.pkg("install bar@1.0")
707 self.pkg("install --parsable 0 baz@1.0")
708 self.output.index("multi-line release notes")
709 self.output.index("should work too,")
710 self.output.index("we'll see if they do.")
711 self.pkg("uninstall '*'")
713 def test_release_note_5(self):
715 self.pkg("install -n hovercraft@1.0")
716 force_text(self.output, "utf-8").index(u"Моё судно на воздушной подушке полно угрей")
717 force_text(self.output, "utf-8").index(u"Eels are best smoked")
718 self.pkg("install -v hovercraft@1.0")
719 force_text(self.output, "utf-8").index(u"Моё судно на воздушной подушке полно угрей")
720 force_text(self.output, "utf-8").index(u"Eels are best smoked")
721 self.pkg("uninstall '*'")
723 def test_release_note_6(self):
725 self.pkg("install --parsable 0 hovercraft@1.0")
726 self.pkg("history -n 1 -N")
727 force_text(self.output, "utf-8").index(u"Моё судно на воздушной подушке полно угрей")
728 force_text(self.output, "utf-8").index(u"Eels are best smoked")
729 self.pkg("uninstall '*'")
731 def test_release_note_7(self):
733 self.pkg("install bar@1.0")
734 self.pkg("install -v hovercraft@1.0 baz@1.0")
735 uni_out = force_text(self.output, "utf-8")
744 uni_out.index(self.multi_unicode)
745 uni_out.index(self.multi_ascii)
750 self.pkg("history -n 1 -HN", su_wrap=True)
751 uni_out = force_text(self.output, "utf-8")
760 uni_out.index(self.multi_unicode)
761 uni_out.index(self.multi_ascii)
763 self.pkg("uninstall '*'")
765 def test_release_note_8(self):
767 self.pkg("-D GenerateNotesFile=1 install hovercraft@1.0")
769 for field in force_text(self.output, "utf-8").split(u" "):
785 assert self.multi_unicode == release_note
786 self.pkg("uninstall '*'")