feat(installer): build worker source over SSH
Все проверки выполнены успешно
CI / test (push) Successful in 3m13s
Docker / Build and publish worker image (push) Successful in 10m35s
Все проверки выполнены успешно
CI / test (push) Successful in 3m13s
Docker / Build and publish worker image (push) Successful in 10m35s
Этот коммит содержится в:
@@ -19,14 +19,14 @@ func TestFingerprintHostKeyCallback(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
callback, err := hostKeyCallback(DeployOptions{HostKeyFingerprint: ssh.FingerprintSHA256(publicKey)})
|
||||
callback, err := hostKeyCallback(SSHOptions{HostKeyFingerprint: ssh.FingerprintSHA256(publicKey)})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := callback("host", &net.TCPAddr{}, publicKey); err != nil {
|
||||
t.Fatalf("matching fingerprint rejected: %v", err)
|
||||
}
|
||||
callback, err = hostKeyCallback(DeployOptions{HostKeyFingerprint: "SHA256:wrong"})
|
||||
callback, err = hostKeyCallback(SSHOptions{HostKeyFingerprint: "SHA256:wrong"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -36,15 +36,17 @@ func TestFingerprintHostKeyCallback(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestKnownHostsMissingFile(t *testing.T) {
|
||||
if _, err := hostKeyCallback(DeployOptions{KnownHostsFile: t.TempDir() + "/missing"}); err == nil {
|
||||
if _, err := hostKeyCallback(SSHOptions{KnownHostsFile: t.TempDir() + "/missing"}); err == nil {
|
||||
t.Fatal("missing known_hosts file accepted")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeployRejectsMutableDockerImageBeforeConnecting(t *testing.T) {
|
||||
err := Deploy(DeployOptions{
|
||||
Host: "unreachable.example.test",
|
||||
User: "deploy",
|
||||
SSHOptions: SSHOptions{
|
||||
Host: "unreachable.example.test",
|
||||
User: "deploy",
|
||||
},
|
||||
Token: "token",
|
||||
Docker: true,
|
||||
Image: "reg.rsxx.ru/rsmon/rsmon-worker:latest",
|
||||
|
||||
Ссылка в новой задаче
Block a user