1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00

7 Commits

Author SHA1 Message Date
Natanael Copa
c46b12ea04 tests: fix tests to use init__ prefix
commit 4b86923358c0 (Fixes for tiny-cloud Wrapper) changed API so all
init functions had an init__ prefix and the SKIP_INIT_ACTION was moved
to tiny-cloud.

Adjust the tests for this.
2023-05-02 14:32:46 +02:00
Jake Buchholz Göktürk
81869cefcc Consolidate init functionality in /sbin/tiny-cloud 2023-04-30 03:37:11 +00:00
Natanael Copa
e51051c7ca tests: refactor fake userdata for nocloud
- move it so it can be shared
- remove mentions of #cloud-config to avoid confusion
2023-04-06 22:07:58 +02:00
Natanael Copa
7ea8f69a06 Fix user-data decompression on all shells
yash[1] and zsh does not handle 8-bit bytes in strings good. Work around it
by using printf ... | cmp ... to compare the header. This should be 100%
posix compatible.

Also fix some of the compression header magic bytes:

- unxz: Use octal aas the string '\3757zXZ\000' was misinterpreted by some
  shells.
- lzma: the third byte represents compression mode[2], and we want
  support all compression modes not only '8', so we only check the first
  three bytes instead of 4.

[1]: Upstream report: https://osdn.net/projects/yash/ticket/47772
[2]: https://github.com/frizb/FirmwareReverseEngineering/blob/master/IdentifyingCompressionAlgorithms.md#lzma
2023-04-06 17:19:40 +02:00
Natanael Copa
ab46d7223f tests: add test for save_userdata
Test that compressed user-data gets properly detected
2023-04-06 17:19:40 +02:00
Natanael Copa
a67cbd37b0 Add test for ssh-keys in nocloud yaml 2023-04-06 17:19:40 +02:00
Natanael Copa
0f53f14399 tests: add initial tests for init-main 2023-04-06 17:19:36 +02:00