移除SSH密钥入口并固定密码认证
This commit is contained in:
1 parent
fb1e36313b
commit
626de357ba
5 files changed
+3
-7
No files matched your search
@@ -81,7 +81,7 @@ func newRootCommand() *cobra.Command {
|
||||
newLogsCommand(), newConfigCommand(), newBackupCommand(), newRestoreCommand(),
|
||||
newServiceCommand(), newDNSCommand(),
|
||||
)
|
||||
for _, name := range []string{"domain", "server", "ssh-key", "renew", "deploy"} {
|
||||
for _, name := range []string{"domain", "server", "renew", "deploy"} {
|
||||
root.AddCommand(newRetiredBusinessCommand(name))
|
||||
}
|
||||
localizeHelpFlags(root)
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestRootExposesOnlyOperationalCommands(t *testing.T) {
|
||||
if err := root.Execute(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, name := range []string{"domain", "server", "ssh-key", "renew", "deploy"} {
|
||||
for _, name := range []string{"domain", "server", "renew", "deploy"} {
|
||||
if strings.Contains(output.String(), "\n "+name+" ") {
|
||||
t.Errorf("正式帮助仍展示历史业务命令:%s", name)
|
||||
}
|
||||
@@ -48,8 +48,6 @@ func TestRetiredBusinessCommandsRejectBeforeAccessingData(t *testing.T) {
|
||||
{"domain", "import", "--private-key", "not-a-real-key.pem"},
|
||||
{"server", "add", "--password", "test-secret-not-real"},
|
||||
{"server", "delete", "--id", "example"},
|
||||
{"ssh-key", "add", "--name", "example"},
|
||||
{"ssh-key", "delete", "--id", "example"},
|
||||
{"renew"},
|
||||
{"renew", "--id", "example"},
|
||||
{"deploy", "--id", "example"},
|
||||
|
||||
@@ -399,7 +399,6 @@ type serverRequest struct {
|
||||
Address string `json:"address" binding:"required"`
|
||||
Port int `json:"port"`
|
||||
Username string `json:"username" binding:"required"`
|
||||
AuthMethod string `json:"auth_method"`
|
||||
Password string `json:"password"`
|
||||
HostKeyFingerprint string `json:"host_key_fingerprint" binding:"required"`
|
||||
CertificatePath string `json:"certificate_path"`
|
||||
|
||||
Reference in new issue
Block a user