Skip to content

Commit

Permalink
refactor: rename authorised to authorized
Browse files Browse the repository at this point in the history
Removing all references to authorised keys from authorized keys tests to
keep the naming consistent.
  • Loading branch information
tlm committed Jul 17, 2024
1 parent beea58f commit e76419d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/suites/authorized_keys/machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ run_machine_ssh() {

# Watch the debug log for the agent to assert that a key has been added to
# the machine.
timeout 5m juju debug-log --tail | grep -m 1 'adding ssh keys to authorised keys' || true
timeout 5m juju debug-log --tail | grep -m 1 'adding ssh keys to authorized keys' || true

# Check that the test can ssh to the machine with the new keypair and run a
# command.
check_contains "$(juju ssh 0 -i \"${ssh_key_file}\" echo foobar)" "foobar"
}

# test_machine_ssh is responsible for testing that adding authorised keys to a
# test_machine_ssh is responsible for testing that adding authorized keys to a
# model traverse through the controller and down to the machine agents. After
# this has happened ssh access to a machine should be granted for the owner of
# the newly added public key.
test_machine_ssh() {
if [ "$(skip 'test_machine_ssh')" ]; then
echo "==> TEST SKIPPED: authorisedkeys machine ssh"
echo "==> TEST SKIPPED: authorized keys machine ssh"
return
fi

Expand Down
6 changes: 3 additions & 3 deletions tests/suites/authorized_keys/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ test_authorized_keys() {
echo "==> Checking for dependencies"
check_dependencies juju

log_file="${TEST_DIR}/authorised_keys.log"
log_file="${TEST_DIR}/authorized_keys.log"

ensure "authorisedkeys" "$log_file"
ensure "authorizedkeys" "$log_file"

test_user_ssh_keys
test_machine_ssh

destroy_controller "authorisedkeys"
destroy_controller "authorizedkeys"
}
2 changes: 1 addition & 1 deletion tests/suites/authorized_keys/user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ run_user_ssh_keys() {

test_user_ssh_keys() {
if [ "$(skip 'test_user_ssh_keys')" ]; then
echo "==> TEST SKIPPED: authorisedkeys user ssh keys"
echo "==> TEST SKIPPED: authorized keys user ssh keys"
return
fi

Expand Down

0 comments on commit e76419d

Please sign in to comment.