-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Testing failures #69
Comments
Sorry for the late reply! Essentially, don't worry about it - first of all these errors are pretty minor, but second, the test suite is actually supposed to run against the default dir2cast.ini, so the customisations probably would make it fail as you have experienced. The test suite tests lots of variations of the settings, as diversions from the defaults. (It's not verifying that your specific setup works, so much as proving that there aren't bugs in general for as many scenarios as I could imagine). To be honest I hadn't considered that someone might change the .ini then try the test suite - I will have a go at making them independent of one another, so that it's not confusing. On the other hand, if you were to download a fresh copy of dir2cast, and run the suite without modifying the .ini, and if it were to fail, that would be useful for me to know about as it could indicate a bug or something else I need to improve. So, thanks for your feedback all the same! |
Out of interest can you tell me which settings you modified? I'd like to make sure for myself that all is well :) |
#70 adds a test which will warn you if you are not testing the defaults |
No problem! This is a hobby for me so very much on the backburner. Here's my dir2cast.ini file: `; Configuration for dir2cast by Ben XO. http://www.ben-xo.com/dir2cast ; This is an 'ini' file. Lines beginning with ';' are comments. ; dir2cast will look in 2 places for this file. 1st, it will look in ; If you only have 1 podcast, or your settings apply to every dir2cast ; If you have several podcasts being served from one copy of dir2cast, ; N.B. Although most settings do not need double-quotes (" ") around them, ; ***** GLOBAL SETTINGS *** usually OK to leave unspecified ****************** ; The following 3 settings are not mandatory because dir2cast should be ; The full filesystem path to the MP3 folder ; The base to look for folders if they are specified in the URL ; The URL of the MP3 folder ; Uncomment this if you want to check in every sub-folder for new files as well. ; *** INFORMATION ABOUT YOUR PODCAST - you SHOULD set this how you like it *** ; The copyright notice of the feed ; Webmaster of the feed. This must be an email address, ; Name of the Owner of the podcast for iTunes ; Email of the Author of the podcast for iTunes ; URL of the feed's home page (this is NOT where the MP3s are! It is ; The title of the feed. ; The Author of the podcast for iTunes ; Categories for iTunes ; Whether or not the feed contains explicit content. ; *** INFORMATION ABOUT YOUR PODCAST - the following can be set using text files *** ; Description of the feed ; Subtitle of the feed for iTunes ; Summary of the feed for iTunes ; Image for the podcast ; Image for the podcast for iTunes ; Extra text for the 'iTunes Subtitle', which appears next to each episode ; Whether to output the itunes:episode and itunes:season tags ; *** CHECK THESE ARE OK. *** ; Language of the feed ; Where to cache RSS feeds (this must be writable by the web server) ; Number of items to show in the feed ; Format of the <title> tag for each item. If this is set to 'false', ; Automatically extract cover images from the files in the feed so they ; *** THESE SHOULD BE LEFT AS THEY ARE - unless you have a good reason. *** ; Files must be at least this old to be included in the feed. If they are ; Number of seconds for which the cache files are guaranteed valid; that is ; Time-to-live (Expiry time) of the feed. This appears in the tag, and ; The password to use on the 'force=' part of the URL in order to ; If you want the script to write the RSS to a file instead of to stdout ; If you want to change the type attribute on the atom:link element ; If you want the tag for an item to come from the summary (auto- ; If you want to have HTML in your tag set this parameter. |
I built a test version using a modified nginx image. Seems to work well but gives me the two failures so you can check them on your end. The project folder contains the docker-compose.yml file and two folders duckdns-config and nginx-config. My Dockerfile is in nginx-config/dockerfile. Here's my docker-compose.yml: version: "3.8"
services:
testduckdns:
image: lscr.io/linuxserver/duckdns
container_name: testduckdns
environment:
- PUID=1000
- PGID=1000
- SUBDOMAINS=[subdomain] #enter [subdomain].duckdns.org here
- TOKEN= #enter duckdns token here
- LOG_FILE=false #optional
volumes:
- ./duckdns-config/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
nginx:
# old image from linuxserver
# image: lscr.io/linuxserver/nginx:latest
container_name: test-nginx
build:
context: ./nginx-config/dockerfile
dockerfile: Dockerfile
environment:
- PUID=1000
- PGID=1000
volumes:
- ./nginx-config:/config
- /etc/localtime:/etc/localtime:ro
ports:
- 8010:80
- 4439:443
restart: unless-stopped and the nginx Dockerfile: Dockerfile # syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
# set version label
ARG BUILD_DATE
ARG VERSION
ARG NGINX_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache --upgrade \
memcached \
nginx==${NGINX_VERSION} \
nginx-mod-http-brotli==${NGINX_VERSION} \
nginx-mod-http-dav-ext==${NGINX_VERSION} \
nginx-mod-http-echo==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} \
nginx-mod-http-geoip==${NGINX_VERSION} \
nginx-mod-http-geoip2==${NGINX_VERSION} \
nginx-mod-http-headers-more==${NGINX_VERSION} \
nginx-mod-http-image-filter==${NGINX_VERSION} \
nginx-mod-http-perl==${NGINX_VERSION} \
nginx-mod-http-redis2==${NGINX_VERSION} \
nginx-mod-http-set-misc==${NGINX_VERSION} \
nginx-mod-http-upload-progress==${NGINX_VERSION} \
nginx-mod-http-xslt-filter==${NGINX_VERSION} \
nginx-mod-mail==${NGINX_VERSION} \
nginx-mod-rtmp==${NGINX_VERSION} \
nginx-mod-stream==${NGINX_VERSION} \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
build-base \
php81-bcmath \
php81-bz2 \
php81-ctype \
php81-curl \
php81-dev \
php81-dom \
php81-exif \
php81-ftp \
php81-gd \
php81-gmp \
php81-iconv \
php81-imap \
php81-intl \
php81-ldap \
php81-mysqli \
php81-mysqlnd \
php81-opcache \
php81-pdo_mysql \
php81-pdo_odbc \
php81-pdo_pgsql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-apcu \
php81-pecl-mailparse \
php81-pecl-memcached \
php81-pecl-redis \
php81-pgsql \
php81-phar \
php81-posix \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-tokenizer \
php81-xmlreader \
php81-xsl \
php81-zip && \
apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php81-pecl-mcrypt \
php81-pecl-xmlrpc
RUN apk add --update linux-headers
RUN pecl config-set php_ini /etc/php81/php.ini
RUN pecl install xdebug
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# ports and volumes
EXPOSE 80 443
VOLUME /config Then I download dir2cast, extract it, and place the files within in [project folder]/nginx-config/www To be clear, nginx-config/www is the website / For a test file, I downloaded The Invisible Man from: https://librivox.org/invisible-man-by-h-g-wells/ Unzipped it, then copied the first file (invisible_man_01-02_wells_64kb.mp3) into nginx-config/www I have the relevant ports forwarded through Nginx Proxy Manager running in another container elsewhere, so the test-nginx webserver is accessible on the internet. Thankfully, my ISP's NAT still supports this. Then I refreshed the page at [subdomain].duckdns.org/dir2cast.php and the rss reads: <rss version="2.0">
<channel>
<title>www</title>
<link>http://[subdomain].duckdns.org/dir2cast.php</link>
<description>Podcast</description>
<lastBuildDate>Fri, 19 May 2023 15:46:09 +0000</lastBuildDate>
<language>en-us</language>
<copyright>2023</copyright>
<generator>
dir2cast 1.38 by Ben XO (https://github.com/ben-xo/dir2cast/)
</generator>
<webMaster/>
<ttl>60</ttl>
<atom:link href="http://[subdomain].duckdns.org/dir2cast.php" rel="self" type="application/rss+xml"/>
<itunes:subtitle>Podcast</itunes:subtitle>
<itunes:author/>
<itunes:summary>Podcast</itunes:summary>
<itunes:type>episodic</itunes:type>
<item>
<itunes:author>H.G. Wells</itunes:author>
<itunes:duration>22:42</itunes:duration>
<itunes:subtitle>H.G. Wells</itunes:subtitle>
<title>Invisible Man - Chapters 01-02</title>
<link>
http://[subdomain].duckdns.org/invisible_man_01-02_wells_64kb.mp3
</link>
<pubDate>Fri, 19 May 2023 15:42:45 +0000</pubDate>
<description></description>
<enclosure url="http://[subdomain].duckdns.org/invisible_man_01-02_wells_64kb.mp3" length="10892352" type="audio/mpeg"/>
</item>
</channel>
</rss> This produces a functional podcast that works with Overcast on iOS, at least, by adding https://[subdomain].duckdns.org/dir2cast.php as expected. To run the test suite you built, I do: docker exec -it test-nginx bash
cd config/www/test && composer install
./run.sh Which gives me the following output:
Hope this helps, I appreciate all the time you put in here and want you to know that your project here has brought my partner and I some joy. :) |
You should find that if you look at the branch from pull request #70 that running the tests with a modified config will warn you that the test isn't really testing what was intended, so the failure can be ignored. the two tests you have which failed are tests for the behaviour when the media dir isn't accessible - which in your case, it definitely is (as you'd expect!) |
When I run through the test process, I get several "Failed asserting that two strings are equal." errors. They're all issues where I customized dir2cast.ini as directed.
I get two errors that seem more significant:
I think I've addressed any permissions issues by mapping a working temp folder based on the directions in the docker-compose.yml file, but these issues persist. What should I do?
The text was updated successfully, but these errors were encountered: