|
34 | 34 | 10.3.157.24 7777 True False
|
35 | 35 | """
|
36 | 36 |
|
| 37 | +show_server_output_5="""\ |
| 38 | +ip port insecure disable |
| 39 | +----------- ------ ---------- --------- |
| 40 | +10.10.10.11 6443 True False |
| 41 | +""" |
| 42 | + |
| 43 | +show_server_output_6="""\ |
| 44 | +ip port insecure disable |
| 45 | +----------- ------ ---------- --------- |
| 46 | +10.3.157.24 6443 True False |
| 47 | +""" |
| 48 | + |
37 | 49 | empty_server_status="""\
|
38 | 50 | Kubernetes server has no status info
|
39 | 51 | """
|
@@ -96,6 +108,20 @@ def test_no_kube_server(self, get_cmd_module):
|
96 | 108 | result = runner.invoke(config.config.commands["kubernetes"].commands["server"], ["ip", "10.10.10.11"], obj=db)
|
97 | 109 | self.__check_res(result, "set server IP when none", "")
|
98 | 110 |
|
| 111 | + result = runner.invoke(show.cli.commands["kubernetes"].commands["server"].commands["config"], [], obj=db) |
| 112 | + self.__check_res(result, "config command default value", show_server_output_5) |
| 113 | + |
| 114 | + |
| 115 | + def test_only_kube_server(self, get_cmd_module): |
| 116 | + (config, show) = get_cmd_module |
| 117 | + runner = CliRunner() |
| 118 | + db = Db() |
| 119 | + |
| 120 | + db.cfgdb.delete_table("KUBERNETES_MASTER") |
| 121 | + db.cfgdb.set_entry("KUBERNETES_MASTER", "SERVER", {"ip": "10.3.157.24"}) |
| 122 | + |
| 123 | + result = runner.invoke(show.cli.commands["kubernetes"].commands["server"].commands["config"], [], obj=db) |
| 124 | + self.__check_res(result, "show command default value", show_server_output_6) |
99 | 125 |
|
100 | 126 |
|
101 | 127 | def test_kube_server_status(self, get_cmd_module):
|
|
0 commit comments