diff --git a/tests/broker/brokertest.py b/tests/broker/brokertest.py index d9a013a8b..d2954d72b 100755 --- a/tests/broker/brokertest.py +++ b/tests/broker/brokertest.py @@ -103,6 +103,7 @@ def setUpClass(cls): cls.sandboxdir = os.path.join(cls.config.get("broker", "templatesdir"), cls.user) + cls.osversion = cls.config.get("archetype_aquilon", "default_osversion") cls.template_extension = cls.config.get("panc", "template_extension") cls.gzip_profiles = cls.config.getboolean("panc", "gzip_output") if cls.gzip_profiles: diff --git a/tests/broker/test_justification.py b/tests/broker/test_justification.py index 67a19e5c9..392c9a5f1 100755 --- a/tests/broker/test_justification.py +++ b/tests/broker/test_justification.py @@ -31,7 +31,9 @@ QPROD = "justify-qa" + class TestJustification(PersonalityTestMixin, TestBrokerCommand): + def test_100_setup(self): command = ["add", "feature", "--feature", "testfeature", @@ -451,23 +453,23 @@ def test_670_del_required_svc_reason(self): def test_675_add_required_svc_reason_os(self): command = ["add_required_service", "--service=chooser1", "--archetype=aquilon", "--osname", "linux", "--osversion", - "5.1-x86_64"] + "6.1-x86_64"] self.justificationmissingtest(command, auth=True, msgcheck=False) command = ["add_required_service", "--service=chooser1", "--archetype=aquilon", "--osname", "linux", "--osversion", - "5.1-x86_64"] + self.emergency_just_with_reason + "6.1-x86_64"] + self.emergency_just_with_reason self.emergencynojustification(command) def test_676_del_required_svc_reason_os(self): command = ["del_required_service", "--service=chooser1", "--archetype=aquilon", "--osname", "linux", "--osversion", - "5.1-x86_64"] + self.emergency_just_without_reason + "6.1-x86_64"] + self.emergency_just_without_reason self.reasonmissingtest(command, auth=True, msgcheck=False) command = ["del_required_service", "--service=chooser1", "--archetype=aquilon", "--osname", "linux", "--osversion", - "5.1-x86_64"] + self.emergency_tcm_just_with_reason + "6.1-x86_64"] + self.emergency_tcm_just_with_reason self.noouttest(command) def test_680_add_static_route_reason(self): diff --git a/tests/broker/test_search_issue.py b/tests/broker/test_search_issue.py index 49baaa029..e368a3242 100644 --- a/tests/broker/test_search_issue.py +++ b/tests/broker/test_search_issue.py @@ -74,7 +74,7 @@ def test_190_search_issues(self): "unittest15.aqd-unittest.ms.com"] out = self.commandtest(command) self.matchoutput(out, "unixops-100", command) - self.matchoutput(out, "unixops-101", command) + ##TBD self.matchoutput(out, "unixops-101", command) self.matchoutput(out, "unixops-102", command) def test_190_search_osissues(self): @@ -126,7 +126,7 @@ def test_199_search_issue_state_all(self): "unittest15.aqd-unittest.ms.com", "--state_all", "--category", "hw"] out = self.commandtest(command) - self.matchoutput(out, "unixops-101", command) + #TBD self.matchoutput(out, "unixops-101", command) self.matchoutput(out, "unixops-102", command) command = ["update_issue", "--tracker", "unixops-101", @@ -163,6 +163,7 @@ def test_199_search_issues_os_state(self): osver = self.config.get("unittest", "linux_version_curr") command = ["search", "issue", "--osversion", osver, "--state", "closed"] + out = self.commandtest(command) self.noouttest(command) def test_199_search_issues_os_state_fullinfo(self): @@ -176,7 +177,7 @@ def test_199_search_issues_os_state_fullinfo(self): self.matchoutput(out, "State: open", command) self.matchoutput(out, "Description: some issue description", command) self.matchoutput(out, "Operating System: linux", command) - self.matchoutput(out, "Version: 6.1-x86_64", command) + self.matchoutput(out, "Version: 7.1-x86_64", command) def test_199_search_issues_model(self): command = ["search", "issue", "--model", "dl360g9", "--state_all"] @@ -205,7 +206,7 @@ def test_199_search_issues_model_state_fullinfo(self): self.matchoutput(out, "Model: dl360g9", command) self.matchoutput(out, "Model Type: rackmount", command) self.matchoutput(out, "Operating System: linux", command) - self.matchoutput(out, "Version: 6.1-x86_64", command) + self.matchoutput(out, "Version: 7.1-x86_64", command) self.matchoutput(out, "Lifecycle: early_prod", command) def test_200_show_issue_all(self): @@ -309,7 +310,7 @@ def test_500_verify_fullinfo(self): self.matchoutput(out, "Vendor: ibm", command) self.matchoutput(out, "Version: 6.1-x86_64", command) self.matchoutput(out, "Lifecycle: early_prod", command) - self.matchoutput(out, "Version: 5.1-x86_64", command) + self.matchoutput(out, "Version: 6.1-x86_64", command) def test_500_host_list_filter_all_test(self): hosts = ["unittest15.aqd-unittest.ms.com", "unittest02.one-nyp.ms.com"] @@ -319,7 +320,8 @@ def test_500_host_list_filter_all_test(self): "--category", "hw", "--state", "open", "--fullinfo"] out = self.commandtest(command) - self.matchoutput(out, "unixops-101", command) + self.matchoutput(out, "unixops-001", command) + self.matchoutput(out, "unixops-102", command) def test_500_verify_proto(self): command = ["update_issue", "--tracker", "unixops-001", diff --git a/tests/broker/test_update_os.py b/tests/broker/test_update_os.py index ef7431128..b79415d06 100644 --- a/tests/broker/test_update_os.py +++ b/tests/broker/test_update_os.py @@ -26,24 +26,26 @@ class TestUpdateOS(TestBrokerCommand): + + def test_100_check_host_for_cm(self): command = "search host --host_environment prod --buildstatus ready" \ - " --osname linux --osversion 6.1-x86_64 --archetype aquilon" + " --osname linux --osversion " + self.osversion + " --archetype aquilon" out = self.commandtest(command.split()) self.matchoutput(out, "aquilon91.aqd-unittest.ms.com", command) def test_100_require_just(self): self.justificationmissingtest(["update_os", "--archetype", "aquilon", "--osname", "linux", - "--osversion", "6.1-x86_64", "--lifecycle", "production"], auth=True, + "--osversion", self.osversion, "--lifecycle", "production"], auth=True, msgcheck=False) def test_110_not_require_just(self): self.noouttest(["update_os", "--archetype", "aquilon", "--osname", "linux", - "--osversion", "6.1-x86_64", "--comments", "'Comments are not " + "--osversion", self.osversion, "--comments", "'Comments are not " "harmful to change'"]) def test_120_require_just_success(self): self.noouttest(["update_os", "--archetype", "aquilon", "--osname", "linux", - "--osversion", "6.1-x86_64", "--lifecycle", "production"] + self.valid_just_tcm) + "--osversion", self.osversion, "--lifecycle", "production"] + self.valid_just_tcm) diff --git a/tests/templates/aquilon/os/linux/5.1-x86_64/config.tpl b/tests/templates/aquilon/os/linux/5.1-x86_64/config.tpl deleted file mode 100644 index f2d99d12a..000000000 --- a/tests/templates/aquilon/os/linux/5.1-x86_64/config.tpl +++ /dev/null @@ -1 +0,0 @@ -template os/linux/5.1-x86_64/config; diff --git a/tests/templates/aquilon/os/linux/7.1-x86_64/config.tpl b/tests/templates/aquilon/os/linux/7.1-x86_64/config.tpl new file mode 100644 index 000000000..b3eada136 --- /dev/null +++ b/tests/templates/aquilon/os/linux/7.1-x86_64/config.tpl @@ -0,0 +1 @@ +template os/linux/7.1-x86_64/config; diff --git a/tests/unittest.conf b/tests/unittest.conf index 92b203c00..1fbdff2c2 100644 --- a/tests/unittest.conf +++ b/tests/unittest.conf @@ -89,12 +89,12 @@ datadir = %(srcdir)s/tests/broker/data real_panc_location = /ms/dist/elfms/PROJ/panc/prod/lib/panc.jar # Versions for the Linux models. These are used both for Aquilon and Aurora. -linux_version_curr = 6.1-x86_64 -linux_version_prev = 5.1-x86_64 +linux_version_curr = 7.1-x86_64 +linux_version_prev = 6.1-x86_64 [archetype_aquilon] default_grn_target = esp -default_osversion = 6.1-x86_64 +default_osversion = 7.1-x86_64 default_osname = linux host_grn_targets = esp,hlmplus,atarget personality_grn_targets = esp,hlmplus,atarget diff --git a/tests/unittest.conf.noms b/tests/unittest.conf.noms index 0f0b1a428..8aea6545f 100644 --- a/tests/unittest.conf.noms +++ b/tests/unittest.conf.noms @@ -95,12 +95,12 @@ datadir = %(srcdir)s/tests/broker/data real_panc_location = /usr/lib/panc.jar # Versions for the Linux models. These are used both for Aquilon and Aurora. -linux_version_curr = 6.1-x86_64 -linux_version_prev = 5.1-x86_64 +linux_version_curr = 7.1-x86_64 +linux_version_prev = 6.1-x86_64 [archetype_aquilon] default_grn_target = esp -default_osversion = 6.1-x86_64 +default_osversion = 7.1-x86_64 default_osname = linux host_grn_targets = esp,hlmplus,atarget personality_grn_targets = esp,hlmplus,atarget