all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 2/2] tests: add minimal test for LXC_NAME hosts entry
Date: Wed, 14 Jun 2023 12:43:16 +0200	[thread overview]
Message-ID: <20230614104316.3250821-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20230614104316.3250821-1-s.ivanov@proxmox.com>

based on test-alpine-002

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/test/test-alpine-003/config               |  2 ++
 src/test/test-alpine-003/etc/alpine-release   |  1 +
 src/test/test-alpine-003/etc/hostname.exp     |  1 +
 src/test/test-alpine-003/etc/hosts            |  5 +++++
 src/test/test-alpine-003/etc/hosts.exp        |  5 +++++
 .../test-alpine-003/etc/network/interfaces    |  0
 src/test/test-alpine-003/etc/passwd           | 21 +++++++++++++++++++
 .../roothome/.ssh/authorized_keys.exp         |  3 +++
 8 files changed, 38 insertions(+)
 create mode 100644 src/test/test-alpine-003/config
 create mode 100644 src/test/test-alpine-003/etc/alpine-release
 create mode 100644 src/test/test-alpine-003/etc/hostname.exp
 create mode 100644 src/test/test-alpine-003/etc/hosts
 create mode 100644 src/test/test-alpine-003/etc/hosts.exp
 create mode 100644 src/test/test-alpine-003/etc/network/interfaces
 create mode 100644 src/test/test-alpine-003/etc/passwd
 create mode 100644 src/test/test-alpine-003/roothome/.ssh/authorized_keys.exp

diff --git a/src/test/test-alpine-003/config b/src/test/test-alpine-003/config
new file mode 100644
index 0000000..9e8a6b7
--- /dev/null
+++ b/src/test/test-alpine-003/config
@@ -0,0 +1,2 @@
+hostname: test3
+net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1
diff --git a/src/test/test-alpine-003/etc/alpine-release b/src/test/test-alpine-003/etc/alpine-release
new file mode 100644
index 0000000..c10780c
--- /dev/null
+++ b/src/test/test-alpine-003/etc/alpine-release
@@ -0,0 +1 @@
+3.13.1
diff --git a/src/test/test-alpine-003/etc/hostname.exp b/src/test/test-alpine-003/etc/hostname.exp
new file mode 100644
index 0000000..df6b0d2
--- /dev/null
+++ b/src/test/test-alpine-003/etc/hostname.exp
@@ -0,0 +1 @@
+test3
diff --git a/src/test/test-alpine-003/etc/hosts b/src/test/test-alpine-003/etc/hosts
new file mode 100644
index 0000000..22ec15f
--- /dev/null
+++ b/src/test/test-alpine-003/etc/hosts
@@ -0,0 +1,5 @@
+127.0.0.1	localhost localhost.localdomain
+::1		localhost localhost.localdomain
+# --- BEGIN PVE ---
+127.0.1.1 test3.proxmox.com test3
+# --- END PVE ---
diff --git a/src/test/test-alpine-003/etc/hosts.exp b/src/test/test-alpine-003/etc/hosts.exp
new file mode 100644
index 0000000..1d122ce
--- /dev/null
+++ b/src/test/test-alpine-003/etc/hosts.exp
@@ -0,0 +1,5 @@
+127.0.0.1	localhost localhost.localdomain
+::1		localhost localhost.localdomain
+# --- BEGIN PVE ---
+10.0.0.100 test3.proxmox.com test3
+# --- END PVE ---
diff --git a/src/test/test-alpine-003/etc/network/interfaces b/src/test/test-alpine-003/etc/network/interfaces
new file mode 100644
index 0000000..e69de29
diff --git a/src/test/test-alpine-003/etc/passwd b/src/test/test-alpine-003/etc/passwd
new file mode 100644
index 0000000..9fc110f
--- /dev/null
+++ b/src/test/test-alpine-003/etc/passwd
@@ -0,0 +1,21 @@
+root:x:0:0:root:/roothome:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+libuuid:x:100:101::/var/lib/libuuid:/bin/sh
+postfix:x:101:104::/var/spool/postfix:/bin/false
+sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-alpine-003/roothome/.ssh/authorized_keys.exp b/src/test/test-alpine-003/roothome/.ssh/authorized_keys.exp
new file mode 100644
index 0000000..1cb3ec3
--- /dev/null
+++ b/src/test/test-alpine-003/roothome/.ssh/authorized_keys.exp
@@ -0,0 +1,3 @@
+# --- BEGIN PVE ---
+ssh-rsa ABCDEFG ABC@DEF
+# --- END PVE ---
-- 
2.30.2





  parent reply	other threads:[~2023-06-14 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 10:43 [pve-devel] [PATCH container 0/2] add test for LXC_NAME hosts entry and fix a minor glitch Stoiko Ivanov
2023-06-14 10:43 ` [pve-devel] [PATCH container 1/2] tests: fix small syntax glitch Stoiko Ivanov
2023-06-14 10:43 ` Stoiko Ivanov [this message]
2023-06-14 11:32   ` [pve-devel] [PATCH container 2/2] tests: add minimal test for LXC_NAME hosts entry Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230614104316.3250821-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal