-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ env: | |
CONFIG_LOCALE: de_DE.UTF-8 | ||
CONFIG_USERNAME: pi-gen | ||
CONFIG_HOSTNAME: pi-gen-test | ||
CONFIG_PUBLIC_KEY: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAoK4bf7Tj47S67Mf3aCsRPOcYU2F91xLBJ4U4n9jqgsAf75NWFX5UfoRQhWsGVsCYfA84ZTYIrIHMw57CLA2gM= [email protected] | ||
|
||
jobs: | ||
|
||
|
@@ -57,6 +58,7 @@ jobs: | |
wpa-essid: foo | ||
wpa-password: '1234567890' | ||
timezone: ${{ env.CONFIG_TIMEZONE }} | ||
pubkey-ssh-first-user: ${{ env.CONFIG_PUBLIC_KEY }} | ||
|
||
- name: List working directory | ||
run: tree | ||
|
@@ -77,6 +79,7 @@ jobs: | |
source ${ROOTFS_DIR}/etc/default/locale | ||
test "$LANG" = "$CONFIG_LOCALE" | ||
test "$(cat ${ROOTFS_DIR}/etc/timezone)" = "$CONFIG_TIMEZONE" | ||
test "$(sudo cat ${ROOTFS_DIR}/home/${CONFIG_USERNAME}/.ssh/authorized_keys)" = "$CONFIG_PUBLIC_KEY" | ||
- name: Remove test label from PR (if set) | ||
uses: actions-ecosystem/action-remove-labels@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,21 @@ describe('PiGenConfig', () => { | |
'exportLastStageOnly', | ||
'no', | ||
'export-last-stage-only must be either set to "true" or "false", was: no' | ||
], | ||
[ | ||
'enableSsh', | ||
'yes', | ||
'enable-ssh must be set to either "0" or "1" but was: yes' | ||
], | ||
[ | ||
'pubkeyOnlySsh', | ||
'yes', | ||
'pubkey-only-ssh must be set to either "0" or "1" but was: yes' | ||
], | ||
[ | ||
'pubkeySshFirstUser', | ||
'ssh-foo vnqf493rn34xzrm234yru13ß48rnz1x034ztn== [email protected]', | ||
'pubkey-ssh-first-user does not seem to be a valid list of public key according to "ssh-keygen -l", here\'s its output' | ||
] | ||
])( | ||
'rejects %s with invalid value %s', | ||
|
@@ -161,4 +176,15 @@ describe('PiGenConfig', () => { | |
) | ||
} | ||
}) | ||
|
||
it('should accept valid public key file', async () => { | ||
const piGenConfig = { | ||
...DEFAULT_CONFIG, | ||
stageList: ['stage0', 'stage1', 'stage2'], | ||
pubkeySshFirstUser: `ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAF71eRtNA2CqGiKYQLI6ozVyW1XKJUXOqkH1r3ZWIruDvckuwxBUZYMvB5si4PkteJqKJnFsO74LesgxTvacxNELgHvxXCJ4XmuT0O7XujwrFCO6dARYyf+RUO5XKt0LegmbqMq3faE7SMmVJnl39quLWojGZ8kUUeS6rg089l7X9LxBA== [email protected] | ||
ssh-dss AAAAB3NzaC1kc3MAAAEBAI95Ndm5qum/q+2Ies9JUbbzLsWeO683GOjqxJYfPv02BudDUanEGDM5uAnnwq4cU5unR1uF0BGtuLR5h3VJhGlcrA6PFLM2CCiiL/onEQo9YqmTRTQJoP5pbEZY+EvdIIGcNwmgEFexla3NACM9ulSEtikfnWSO+INEhneXnOwEtDSmrC516Zhd4j2wKS/BEYyf+p2BgeczjbeStzDXueNJWS9oCZhyFTkV6j1ri0ZTxjNFj4A7MqTC4PJykCVuTj+KOwg4ocRQ5OGMGimjfd9eoUPeS2b/BJA+1c8WI+FY1IfGCOl/IRzYHcojy244B2X4IuNCvkhMBXY5OWAc1mcAAAAdALr2lqaFePff3uf6Z8l3x4XvMrIzuuWAwLzVaV0AAAEAFqZcWCBIUHBOdQKjl1cEDTTaOjR4wVTU5KXALSQu4E+W5h5L0JBKvayPN+6x4J8xgtI8kEPLZC+IAEFg7fnKCbMgdqecMqYn8kc+kYebosTnRL0ggVRMtVuALDaNH6g+1InpTg+gaI4yQopceMR4xo0FJ7ccmjq7CwvhLERoljnn08502xAaZaorh/ZMaCbbPscvS1WZg0u07bAvfJDppJbTpV1TW+v8RdT2GfY/Pe27hzklwvIk4HcxKW2oh+weR0j4fvtf3rdUhDFrIjLe5VPdrwIRKw0fAtowlzIk/ieu2oudSyki2bqL457Z4QOmPFKBC8aIt+LtQxbh7xfb3gAAAQAG2DjHpzzWGYtVLzMRfXwRFmVNwOO1Rg7ZmLjcy0hWy2b2JzeYJJSj+mRa/GC/Si3e16b0nBJGWU6FcTGSzPOdU3xrMJGLqtIlnUyqS5UJf75xs7zJamuSJ/QMLsvzqglaFBygL5Iuc5KF8lluXFK9h4ggCYxJp2UhgpsX6QMAl7ITeTHFdGWs/nwBHafEwxY3DViTmrj7wXuz8QBzzh65+lIrbOnibg3gliBg77bFLfVEFdylu3f5R18c8sZ9U0c4DOA+ZGlmAqSHZOQtyf8p8T+yKbMBJaQ/R+y0qG/R5Ai1d/aBcGZ1W5b/BU9Z+6yb7ITGowGzObBhU3L4g22e [email protected]` | ||
} | ||
|
||
expect(await validateConfig(piGenConfig)).toBeUndefined() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters