Compare commits
No commits in common. "test-creation" and "master" have entirely different histories.
test-creat
...
master
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
.env
|
|
@ -1,11 +0,0 @@
|
|||||||
FROM selenium/standalone-firefox
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN apt-get -y update
|
|
||||||
RUN apt-get -y install python3-pip
|
|
||||||
USER seluser
|
|
||||||
RUN python3 -m pip install helium --user
|
|
||||||
WORKDIR /home/seluser
|
|
||||||
ADD tests/* /home/seluser/
|
|
||||||
|
|
||||||
ENTRYPOINT [ "python3", "tests.py" ]
|
|
@ -71,7 +71,7 @@ $ node dist/index.js
|
|||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
```
|
```
|
||||||
$ docker run -p 8080:8080 -e RIMGU_ADDRESS=0.0.0.0 -e RIMGU_PORT=8080 -it rimgu:latest
|
$ docker run -p 8080:8080 -e -it RIMGU_ADDRESS=0.0.0.0 -e RIMGU_PORT=8080 rimgu:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
If you decide to run a public instance, consider opening an issue to have it listed here :)
|
If you decide to run a public instance, consider opening an issue to have it listed here :)
|
||||||
@ -106,12 +106,6 @@ This software is released under the AGPL 3.0 license. In short, this means that
|
|||||||
|
|
||||||
You are also requested to not remove attribution and donation information from forks and publications.
|
You are also requested to not remove attribution and donation information from forks and publications.
|
||||||
|
|
||||||
### Testing
|
|
||||||
|
|
||||||
Tests are done with Selenium (Helium Python package)
|
|
||||||
|
|
||||||
Simply run the tests with ./run-tests.sh and if no errors spit out and the exit code is 0, it passed. Set environment variables for the tests in a .env file
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
Donations are welcome and will contribute to development, maintenance and a future public hosted instance.
|
Donations are welcome and will contribute to development, maintenance and a future public hosted instance.
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
services:
|
|
||||||
rimgu:
|
|
||||||
build: .
|
|
||||||
network_mode: host
|
|
||||||
environment:
|
|
||||||
- RIMGU_PORT
|
|
||||||
- RIMGU_HOST
|
|
||||||
- RIMGU_ADDRESS
|
|
||||||
- RIMGU_HTTP_PROXY
|
|
||||||
- RIMGU_HTTPS_PROXY
|
|
||||||
- RIMGU_IMGUR_CLIENT_ID
|
|
||||||
- RIMGU_USE_API="false"
|
|
||||||
- RIMGU_PAGE_TITLE
|
|
||||||
selenium:
|
|
||||||
depends_on:
|
|
||||||
- "rimgu"
|
|
||||||
build:
|
|
||||||
dockerfile: ./Dockerfile-selenium
|
|
||||||
context: .
|
|
||||||
network_mode: host
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sudo docker-compose -f docker-compose-tests.yml up --abort-on-container-exit --build
|
|
||||||
EXIT_CODE=$?
|
|
||||||
sudo docker-compose -f docker-compose-tests.yml down
|
|
||||||
exit "$EXIT_CODE"
|
|
@ -1,12 +0,0 @@
|
|||||||
// Script is executed by selenium because the css selector is bugged in helium/selenium
|
|
||||||
// Check for the meme video's element presence then write to page so helium
|
|
||||||
// knows it is there
|
|
||||||
let vid = document.querySelectorAll('source[src="/InQKYvf.mp4"]')
|
|
||||||
|
|
||||||
if (vid.length){
|
|
||||||
let p = document.createElement("p")
|
|
||||||
p.innerText = "video exists"
|
|
||||||
|
|
||||||
document.body.appendChild(p)
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
import time
|
|
||||||
import helium
|
|
||||||
|
|
||||||
gallery_id = "cMeqLga"
|
|
||||||
f = helium.start_firefox(f"http://127.0.0.1:8080/gallery/{gallery_id}", headless=True)
|
|
||||||
|
|
||||||
assert helium.Text("2021-10-13T15:25:25Z").exists()
|
|
||||||
|
|
||||||
# Check for meme video by running a js to create a p element if it exists
|
|
||||||
with open(f"find_video_for_{gallery_id}.js", "r") as script:
|
|
||||||
f.execute_script(script.read())
|
|
||||||
|
|
||||||
|
|
||||||
assert helium.Text("video exists").exists()
|
|
Loading…
Reference in New Issue
Block a user