Set ssh port in test config, move asciinema-player to reg deps

This commit is contained in:
Elizabeth Hunt 2023-01-28 23:04:49 -07:00
parent 593a631a56
commit ecd07b0c9b
Signed by: simponic
GPG Key ID: 52B3774857EB24B1
4 changed files with 8 additions and 10 deletions

View File

@ -19,5 +19,5 @@ config :hammer,
] ]
config :chessh, config :chessh,
port: 34_355, ssh_port: 34_355,
key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys") key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys")

View File

@ -42,7 +42,7 @@ docker run \
--env-file $env_file \ --env-file $env_file \
--network $project_name \ --network $project_name \
--name $project_name-server \ --name $project_name-server \
--publish "${host}:${host_ssh_port}:${container_ssh_port}/tcp" \ --publish "${HOST}:${SSH_PORT}:${SSH_PORT}/tcp" \
--net-alias server \ --net-alias server \
chessh/server chessh/server
@ -52,6 +52,6 @@ docker run \
--env-file $env_file \ --env-file $env_file \
--network $project_name \ --network $project_name \
--name $project_name-frontend \ --name $project_name-frontend \
--publish "${HOST}:${PORT}:80/tcp" \ --publish "${HOST}:${WEB_PORT}:80/tcp" \
--net-alias frontend \ --net-alias frontend \
chessh/frontend chessh/frontend

View File

@ -13,7 +13,8 @@
"react-modal": "^3.16.1", "react-modal": "^3.16.1",
"react-router-dom": "^6.6.2", "react-router-dom": "^6.6.2",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4",
"asciinema-player": "^3.0.1"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
@ -38,8 +39,5 @@
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
},
"devDependencies": {
"asciinema-player": "^3.0.1"
} }
} }

View File

@ -38,7 +38,7 @@ defmodule Chessh.SSH.AuthTest do
send( send(
parent, parent,
{:attempted, {:attempted,
:ssh.connect(@localhost, Application.fetch_env!(:chessh, :port), :ssh.connect(@localhost, Application.fetch_env!(:chessh, :ssh_port),
user: String.to_charlist(@valid_user.username), user: String.to_charlist(@valid_user.username),
password: String.to_charlist(@valid_user.password), password: String.to_charlist(@valid_user.password),
auth_methods: auth_method, auth_methods: auth_method,
@ -90,7 +90,7 @@ defmodule Chessh.SSH.AuthTest do
Task.Supervisor.start_child(sup, fn -> Task.Supervisor.start_child(sup, fn ->
{:ok, conn} = {:ok, conn} =
:ssh.connect(@localhost, Application.fetch_env!(:chessh, :port), :ssh.connect(@localhost, Application.fetch_env!(:chessh, :ssh_port),
user: String.to_charlist(@valid_user.username), user: String.to_charlist(@valid_user.username),
password: String.to_charlist(@valid_user.password), password: String.to_charlist(@valid_user.password),
auth_methods: 'password', auth_methods: 'password',
@ -105,7 +105,7 @@ defmodule Chessh.SSH.AuthTest do
Task.Supervisor.start_child(sup, fn -> Task.Supervisor.start_child(sup, fn ->
{:ok, conn} = {:ok, conn} =
:ssh.connect(@localhost, Application.fetch_env!(:chessh, :port), :ssh.connect(@localhost, Application.fetch_env!(:chessh, :ssh_port),
user: String.to_charlist(@valid_user.username), user: String.to_charlist(@valid_user.username),
auth_methods: 'publickey', auth_methods: 'publickey',
silently_accept_hosts: true, silently_accept_hosts: true,