Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(config_spec): deal with IP address after minion.id #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alxwr
Copy link
Member

@alxwr alxwr commented Feb 9, 2024

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

The tests did not match minion.id,alias.of.minion.id,103.253.215.19 ssh-.... Now they do.

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

-----> Starting Test Kitchen (v3.3.1)
-----> Verifying <default-debian-11-master-py3>...
       Loaded default 

Profile:   openssh formula (default)
Version:   (not specified)
Target:    ssh://kitchen@localhost:32771
Target ID: b1a7d006-07df-52d0-bebb-8a4cc5ad15a1

  ✔  openssh._mapdata: `map.jinja` should match the reference file
     ✔  File content should match profile map data exactly
  ✔  openssh configuration: should match desired lines
     ✔  File /etc/ssh/sshd_config is expected to be file
     ✔  File /etc/ssh/sshd_config is expected to be owned by "root"
     ✔  File /etc/ssh/sshd_config is expected to be grouped into "root"
     ✔  File /etc/ssh/sshd_config mode is expected to cmp == "0644"
     ✔  File /etc/ssh/sshd_config content is expected to include "ChallengeResponseAuthentication no"
     ✔  File /etc/ssh/sshd_config content is expected to include "X11Forwarding yes"
     ✔  File /etc/ssh/sshd_config content is expected to include "PrintMotd no"
     ✔  File /etc/ssh/sshd_config content is expected to include "AcceptEnv LANG LC_*"
     ✔  File /etc/ssh/sshd_config content is expected to include "Subsystem sftp /usr/lib/openssh/sftp-server"
     ✔  File /etc/ssh/sshd_config content is expected to include "UsePAM yes"
     ✔  File /etc/ssh/ssh_config is expected to be file
     ✔  File /etc/ssh/ssh_config is expected to be owned by "root"
     ✔  File /etc/ssh/ssh_config is expected to be grouped into "root"
     ✔  File /etc/ssh/ssh_config mode is expected to cmp == "0644"
     ✔  File /etc/ssh/ssh_config content is expected to include "Host *"
     ✔  File /etc/ssh/ssh_config content is expected to include "    GSSAPIAuthentication yes"
     ✔  File /etc/ssh/ssh_config content is expected to include "    HashKnownHosts yes"
     ✔  File /etc/ssh/ssh_config content is expected to include "    SendEnv LANG LC_*"
     ✔  File /etc/ssh/ssh_known_hosts is expected to be file
     ✔  File /etc/ssh/ssh_known_hosts is expected to be owned by "root"
     ✔  File /etc/ssh/ssh_known_hosts is expected to be grouped into "root"
     ✔  File /etc/ssh/ssh_known_hosts mode is expected to cmp == "0644"
     ✔  File /etc/ssh/ssh_known_hosts content is expected to include "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGm[...]"
     ✔  File /etc/ssh/ssh_known_hosts content is expected to match /gitlab.com[0-9a-f.:,]* ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABA/
     ✔  File /etc/ssh/ssh_known_hosts content is expected to match /minion\.id,alias\.of\.minion.id[0-9a-f.:,]* ssh-rsa .+/
     ✔  File /etc/ssh/ssh_known_hosts content is expected to match /minion\.id,alias\.of\.minion\.id[0-9a-f.:,]* ssh-ed25519 .+/
  ✔  openssh package: should be installed
     ✔  System Package openssh-server is expected to be installed
  ✔  openssh service: should be running and enabled
     ✔  Service ssh is expected to be enabled
     ✔  Service ssh is expected to be running


Profile:   InSpec shared resources (share)
Version:   (not specified)
Target:    ssh://kitchen@localhost:32771
Target ID: b1a7d006-07df-52d0-bebb-8a4cc5ad15a1

     No tests executed.

Profile Summary: 4 successful controls, 0 control failures, 0 controls skipped
Test Summary: 30 successful, 0 failures, 0 skipped
       Finished verifying <default-debian-11-master-py3> (0m4.16s).
-----> Test Kitchen is finished. (0m4.99s)

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

@alxwr alxwr requested a review from myii February 9, 2024 00:21
@alxwr alxwr self-assigned this Feb 9, 2024
@alxwr alxwr requested a review from baby-gnu February 9, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants