[gvfs/wip/oholy/dav-tests] ci: Enable SFTP test cases



commit 681f01211fec50e9d1cf6319875313f4e4fdef6e
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Jan 29 11:44:59 2020 +0100

    ci: Enable SFTP test cases
    
    openssh-server needs to be installed, SSH key needs to be generated,
    XDG_RUNTIME_DIR needs to be set and non-root user has to be created to
    make SFTP test cases work under CI.

 .gitlab-ci.yml        |  2 +-
 .gitlab-ci/Dockerfile | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 454645bc..4fda5bc1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@ fedora:
     image: registry.gitlab.gnome.org/gnome/gvfs:$TAG
     script:
         - meson -Dinstalled_tests=true -Ddevel_utils=true -Dman=true --prefix /usr --werror build
-        - ninja -C build install
+        - sudo ninja -C build install
         - GIO_USE_VOLUME_MONITOR=unix GVFS_TEST_HTTP_PORT=8089 gnome-desktop-testing-runner gvfs
 
 .gnome-build-meta-template: &gnome-build-meta
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index efcd9d32..496c05a3 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -1,6 +1,6 @@
 FROM fedora:rawhide
 
-RUN dnf install -y avahi-devel avahi-glib-devel dbus-glib-devel docbook-style-xsl fuse3-devel gcc gcr-devel 
gettext-devel glib2-devel gnome-online-accounts-devel gsettings-desktop-schemas-devel libarchive-devel 
libbluray-devel libcap-devel libcdio-paranoia-devel libexif-devel libgcrypt-devel libgdata-devel 
libgphoto2-devel libgudev-devel libimobiledevice-devel libmtp-devel libnfs-devel libplist-devel 
libsecret-devel libsmbclient-devel libsoup-devel libtalloc-devel libudisks2-devel libusb-devel libxslt-devel 
meson openssh-clients pkgconf-pkg-config polkit-devel systemd-devel gnome-desktop-testing dbus-daemon 
python3-twisted python3-gobject procps-ng bzip2 httpd mod_ssl \
+RUN dnf install -y avahi-devel avahi-glib-devel dbus-glib-devel docbook-style-xsl fuse3-devel gcc gcr-devel 
gettext-devel glib2-devel gnome-online-accounts-devel gsettings-desktop-schemas-devel libarchive-devel 
libbluray-devel libcap-devel libcdio-paranoia-devel libexif-devel libgcrypt-devel libgdata-devel 
libgphoto2-devel libgudev-devel libimobiledevice-devel libmtp-devel libnfs-devel libplist-devel 
libsecret-devel libsmbclient-devel libsoup-devel libtalloc-devel libudisks2-devel libusb-devel libxslt-devel 
meson openssh-clients pkgconf-pkg-config polkit-devel systemd-devel gnome-desktop-testing dbus-daemon 
python3-twisted python3-gobject procps-ng bzip2 httpd mod_ssl openssh-server \
  && dnf clean all
 
 RUN dnf install -y --best elfutils-libelf-devel gamin-devel gcc gcc-c++ gdbm gettext git glibc-devel 
glibc-headers gtk-doc libattr-devel libffi-devel libmount-devel libselinux-devel ninja-build pcre-devel 
python3-devel systemtap-sdt-devel zlib-devel \
@@ -12,3 +12,13 @@ RUN dnf install -y --best elfutils-libelf-devel gamin-devel gcc gcc-c++ gdbm get
  && ninja -C _build install \
  && cd .. \
  && rm -rf glib
+
+RUN sed -i -e 's/# %wheel/%wheel/' /etc/sudoers
+RUN useradd -G wheel -m user
+USER user
+WORKDIR /home/user
+
+ENV XDG_RUNTIME_DIR /tmp/user
+RUN mkdir -p $XDG_RUNTIME_DIR -m 00700
+
+RUN ssh-keygen -t rsa -q -N "" -f ~/.ssh/id_rsa


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]