Docker: Add dummy services dummy-webdav & dummy-oidc for development
This commit is contained in:
parent
c385ec73f4
commit
ab602eda19
25 changed files with 89 additions and 98 deletions
8
Makefile
8
Makefile
|
@ -220,11 +220,15 @@ docker-demo-local:
|
|||
scripts/docker-build.sh photoprism
|
||||
scripts/docker-build.sh demo $(DOCKER_TAG)
|
||||
scripts/docker-push.sh demo $(DOCKER_TAG)
|
||||
docker-webdav:
|
||||
docker-dummy-webdav:
|
||||
docker pull --platform=amd64 golang:1
|
||||
docker pull --platform=arm64 golang:1
|
||||
docker pull --platform=arm golang:1
|
||||
scripts/docker-buildx.sh webdav linux/amd64,linux/arm64,linux/arm $(DOCKER_TAG)
|
||||
scripts/docker-buildx.sh dummy-webdav linux/amd64,linux/arm64,linux/arm $(DOCKER_TAG)
|
||||
docker-dummy-oidc:
|
||||
docker pull --platform=amd64 golang:1
|
||||
docker pull --platform=arm64 golang:1
|
||||
scripts/docker-buildx.sh dummy-oidc linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||
packer-digitalocean:
|
||||
$(info Buildinng DigitalOcean marketplace image...)
|
||||
(cd ./docker/examples/cloud && packer build digitalocean.json)
|
||||
|
|
|
@ -9,7 +9,7 @@ services:
|
|||
- apparmor:unconfined
|
||||
depends_on:
|
||||
- mariadb
|
||||
- webdav-dummy
|
||||
- dummy-webdav
|
||||
volumes:
|
||||
- "~/.cache/npm:/root/.cache/npm"
|
||||
- "~/.cache/go-mod:/go/pkg/mod"
|
||||
|
@ -152,5 +152,8 @@ services:
|
|||
MYSQL_PASSWORD: photoprism
|
||||
MYSQL_DATABASE: photoprism
|
||||
|
||||
webdav-dummy:
|
||||
image: photoprism/webdav:20211021
|
||||
dummy-webdav:
|
||||
image: photoprism/dummy-webdav:20211022
|
||||
|
||||
dummy-oidc:
|
||||
image: photoprism/dummy-oidc:20211022
|
|
@ -6,7 +6,7 @@ services:
|
|||
image: photoprism/photoprism:develop
|
||||
depends_on:
|
||||
- postgres
|
||||
- webdav-dummy
|
||||
- dummy-webdav
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
|
@ -71,8 +71,14 @@ services:
|
|||
POSTGRES_USER: photoprism
|
||||
POSTGRES_PASSWORD: photoprism
|
||||
|
||||
webdav-dummy:
|
||||
image: photoprism/webdav:20211021
|
||||
dummy-webdav:
|
||||
image: photoprism/dummy-webdav:20211022
|
||||
|
||||
dummy-oidc:
|
||||
image: photoprism/dummy-oidc:20211022
|
||||
# Expose port 9998 on host
|
||||
# ports:
|
||||
# - "9998:9998"
|
||||
|
||||
volumes:
|
||||
go-mod:
|
||||
|
|
|
@ -6,14 +6,15 @@ services:
|
|||
image: photoprism/photoprism:develop
|
||||
depends_on:
|
||||
- mariadb
|
||||
- webdav-dummy
|
||||
- dummy-webdav
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
# Expose ports 2342, 2343 & 40000 on host
|
||||
ports:
|
||||
- "2342:2342" # Web Server (PhotoPrism)
|
||||
- "2343:2343" # Acceptance Tests
|
||||
- "40000:40000" # Go Debugging
|
||||
- "2342:2342" # PhotoPrism
|
||||
- "2343:2343" # Acceptance Tests
|
||||
- "40000:40000" # Go Debugger
|
||||
shm_size: "2gb"
|
||||
environment:
|
||||
PHOTOPRISM_UID: ${UID:-1000}
|
||||
|
@ -91,8 +92,9 @@ services:
|
|||
command: mysqld --port=4001 --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120
|
||||
expose:
|
||||
- "4001"
|
||||
# Expose port 4001 on host
|
||||
ports:
|
||||
- "4001:4001" # Exposes port 4001 on host
|
||||
- "4001:4001"
|
||||
volumes:
|
||||
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
|
||||
environment:
|
||||
|
@ -101,14 +103,14 @@ services:
|
|||
MYSQL_PASSWORD: photoprism
|
||||
MYSQL_DATABASE: photoprism
|
||||
|
||||
webdav-dummy:
|
||||
image: photoprism/webdav:20211021
|
||||
dummy-webdav:
|
||||
image: photoprism/dummy-webdav:20211022
|
||||
|
||||
oidc-test-op:
|
||||
build: docker/oidc/.
|
||||
image: test-op:latest
|
||||
# ports:
|
||||
# - "9998:9998"
|
||||
dummy-oidc:
|
||||
image: photoprism/dummy-oidc:20211022
|
||||
# Expose port 9998 on host
|
||||
# ports:
|
||||
# - "9998:9998"
|
||||
|
||||
volumes:
|
||||
go-mod:
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
FROM golang:1.17-alpine
|
||||
FROM golang:1
|
||||
|
||||
# Move to working directory /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy files and download dependency using go mod
|
||||
COPY . .
|
||||
COPY /docker/dummy/oidc/app/. .
|
||||
RUN go mod download
|
||||
|
||||
# Build the application
|
||||
RUN go build -o test-op .
|
||||
RUN go build -o server .
|
||||
|
||||
# Allow HTTP scheme
|
||||
ENV CAOS_OIDC_DEV=true
|
||||
|
@ -16,4 +16,4 @@ ENV CAOS_OIDC_DEV=true
|
|||
# Expose HTTP port
|
||||
EXPOSE 9998
|
||||
|
||||
CMD ["/app/test-op"]
|
||||
CMD ["/app/server"]
|
|
@ -21,7 +21,7 @@ func main() {
|
|||
|
||||
port := "9998"
|
||||
config := &op.Config{
|
||||
Issuer: "http://oidc-test-op:9998",
|
||||
Issuer: "http://dummy-oidc:9998",
|
||||
CryptoKey: sha256.Sum256(b),
|
||||
CodeMethodS256: true,
|
||||
}
|
|
@ -10,7 +10,7 @@ RUN go install github.com/hacdias/webdav@latest
|
|||
# Expose HTTP port
|
||||
EXPOSE 80
|
||||
|
||||
COPY /docker/webdav/config.yml /webdav/config.yml
|
||||
COPY /docker/webdav/files /webdav/files
|
||||
COPY /docker/dummy/webdav/config.yml /webdav/config.yml
|
||||
COPY /docker/dummy/webdav/files /webdav/files
|
||||
|
||||
CMD webdav -c /webdav/config.yml
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
72
frontend/package-lock.json
generated
72
frontend/package-lock.json
generated
|
@ -14833,8 +14833,7 @@
|
|||
"@mapbox/mapbox-gl-supported": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz",
|
||||
"integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg=="
|
||||
},
|
||||
"@mapbox/point-geometry": {
|
||||
"version": "0.1.0",
|
||||
|
@ -15202,8 +15201,7 @@
|
|||
"@webpack-cli/configtest": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz",
|
||||
"integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg=="
|
||||
},
|
||||
"@webpack-cli/info": {
|
||||
"version": "1.4.0",
|
||||
|
@ -15216,8 +15214,7 @@
|
|||
"@webpack-cli/serve": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz",
|
||||
"integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA=="
|
||||
},
|
||||
"@xtuc/ieee754": {
|
||||
"version": "1.2.0",
|
||||
|
@ -15254,14 +15251,12 @@
|
|||
"acorn-jsx": {
|
||||
"version": "5.3.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
|
||||
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="
|
||||
},
|
||||
"acorn-private-class-elements": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz",
|
||||
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA=="
|
||||
},
|
||||
"acorn-private-methods": {
|
||||
"version": "0.3.3",
|
||||
|
@ -15344,8 +15339,7 @@
|
|||
"ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
|
||||
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ=="
|
||||
},
|
||||
"alphanum-sort": {
|
||||
"version": "1.0.2",
|
||||
|
@ -16527,8 +16521,7 @@
|
|||
"cssnano-utils": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz",
|
||||
"integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ=="
|
||||
},
|
||||
"csso": {
|
||||
"version": "4.2.0",
|
||||
|
@ -16867,8 +16860,7 @@
|
|||
"ws": {
|
||||
"version": "7.4.6",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
|
||||
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -17143,14 +17135,12 @@
|
|||
"eslint-config-prettier": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
|
||||
"integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew=="
|
||||
},
|
||||
"eslint-config-standard": {
|
||||
"version": "16.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz",
|
||||
"integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg=="
|
||||
},
|
||||
"eslint-formatter-pretty": {
|
||||
"version": "4.1.0",
|
||||
|
@ -17479,8 +17469,7 @@
|
|||
"eslint-plugin-promise": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.1.tgz",
|
||||
"integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA=="
|
||||
},
|
||||
"eslint-plugin-vue": {
|
||||
"version": "7.20.0",
|
||||
|
@ -18419,8 +18408,7 @@
|
|||
"icss-utils": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
|
||||
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA=="
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.2.1",
|
||||
|
@ -20427,26 +20415,22 @@
|
|||
"postcss-discard-comments": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz",
|
||||
"integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg=="
|
||||
},
|
||||
"postcss-discard-duplicates": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz",
|
||||
"integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA=="
|
||||
},
|
||||
"postcss-discard-empty": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz",
|
||||
"integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw=="
|
||||
},
|
||||
"postcss-discard-overridden": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz",
|
||||
"integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q=="
|
||||
},
|
||||
"postcss-double-position-gradients": {
|
||||
"version": "1.0.0",
|
||||
|
@ -20874,8 +20858,7 @@
|
|||
"postcss-modules-extract-imports": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
|
||||
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw=="
|
||||
},
|
||||
"postcss-modules-local-by-default": {
|
||||
"version": "4.0.0",
|
||||
|
@ -20935,8 +20918,7 @@
|
|||
"postcss-normalize-charset": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz",
|
||||
"integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg=="
|
||||
},
|
||||
"postcss-normalize-display-values": {
|
||||
"version": "5.0.1",
|
||||
|
@ -22228,8 +22210,7 @@
|
|||
"ws": {
|
||||
"version": "7.4.6",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
|
||||
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -22532,8 +22513,7 @@
|
|||
"style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ=="
|
||||
},
|
||||
"stylehacks": {
|
||||
"version": "5.0.1",
|
||||
|
@ -23257,8 +23237,7 @@
|
|||
"vuetify": {
|
||||
"version": "1.5.24",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.24.tgz",
|
||||
"integrity": "sha512-guFOgEgZ8VpSgNXOv1QL2fOliaJBoiyNnf+bBqcXsnIppJGRlW1wyT6Ux7ZlQyphSHs+UK1aJNUjcyAtoOiHWg==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-guFOgEgZ8VpSgNXOv1QL2fOliaJBoiyNnf+bBqcXsnIppJGRlW1wyT6Ux7ZlQyphSHs+UK1aJNUjcyAtoOiHWg=="
|
||||
},
|
||||
"walk": {
|
||||
"version": "2.3.14",
|
||||
|
@ -23316,8 +23295,7 @@
|
|||
"acorn-import-assertions": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
|
||||
"integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw=="
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "3.1.1",
|
||||
|
@ -23403,8 +23381,7 @@
|
|||
"ws": {
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
|
||||
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -23572,8 +23549,7 @@
|
|||
"ws": {
|
||||
"version": "8.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
|
||||
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA=="
|
||||
},
|
||||
"x-xss-protection": {
|
||||
"version": "1.3.0",
|
||||
|
|
|
@ -19,7 +19,7 @@ func TestSearchAccounts(t *testing.T) {
|
|||
val := gjson.Get(r.Body.String(), "#(AccName=\"Test Account\").AccURL")
|
||||
count := gjson.Get(r.Body.String(), "#")
|
||||
assert.LessOrEqual(t, int64(1), count.Int())
|
||||
assert.Equal(t, "http://webdav-dummy/", val.String())
|
||||
assert.Equal(t, "http://dummy-webdav/", val.String())
|
||||
assert.Equal(t, http.StatusOK, r.Code)
|
||||
})
|
||||
t.Run("invalid request", func(t *testing.T) {
|
||||
|
@ -111,7 +111,7 @@ func TestCreateAccount(t *testing.T) {
|
|||
t.Run("successful request", func(t *testing.T) {
|
||||
app, router, _ := NewApiTest()
|
||||
CreateAccount(router)
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "CreateTest", "AccOwner": "Test", "AccUrl": "http://webdav-dummy/", "AccType": "webdav",
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "CreateTest", "AccOwner": "Test", "AccUrl": "http://dummy-webdav/", "AccType": "webdav",
|
||||
"AccKey": "123", "AccUser": "admin", "AccPass": "photoprism", "AccError": "", "AccShare": false, "AccSync": false, "RetryLimit": 3, "SharePath": "", "ShareSize": "", "ShareExpires": 0,
|
||||
"SyncPath": "", "SyncInterval": 3, "SyncUpload": false, "SyncDownload": false, "SyncFilenames": false, "SyncRaw": false}`)
|
||||
val := gjson.Get(r.Body.String(), "AccOwner")
|
||||
|
@ -123,7 +123,7 @@ func TestCreateAccount(t *testing.T) {
|
|||
func TestUpdateAccount(t *testing.T) {
|
||||
app, router, _ := NewApiTest()
|
||||
CreateAccount(router)
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "CreateTest3", "AccOwner": "TestUpdate", "AccUrl": "http://webdav-dummy/", "AccType": "webdav",
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "CreateTest3", "AccOwner": "TestUpdate", "AccUrl": "http://dummy-webdav/", "AccType": "webdav",
|
||||
"AccKey": "123", "AccUser": "admin", "AccPass": "photoprism", "AccError": "", "AccShare": false, "AccSync": false, "RetryLimit": 3, "SharePath": "", "ShareSize": "", "ShareExpires": 0,
|
||||
"SyncPath": "", "SyncInterval": 5, "SyncUpload": false, "SyncDownload": false, "SyncFilenames": false, "SyncRaw": false}`)
|
||||
val := gjson.Get(r.Body.String(), "AccOwner")
|
||||
|
@ -131,7 +131,7 @@ func TestUpdateAccount(t *testing.T) {
|
|||
val2 := gjson.Get(r.Body.String(), "SyncInterval")
|
||||
assert.Equal(t, int64(5), val2.Int())
|
||||
val3 := gjson.Get(r.Body.String(), "AccName")
|
||||
assert.Equal(t, "Webdav-Dummy", val3.String())
|
||||
assert.Equal(t, "Dummy-Webdav", val3.String())
|
||||
assert.Equal(t, http.StatusOK, r.Code)
|
||||
id := gjson.Get(r.Body.String(), "ID").String()
|
||||
|
||||
|
@ -170,7 +170,7 @@ func TestUpdateAccount(t *testing.T) {
|
|||
func TestDeleteAccount(t *testing.T) {
|
||||
app, router, _ := NewApiTest()
|
||||
CreateAccount(router)
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "DeleteTest", "AccOwner": "TestDelete", "AccUrl": "http://webdav-dummy/", "AccType": "webdav",
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/accounts", `{"AccName": "DeleteTest", "AccOwner": "TestDelete", "AccUrl": "http://dummy-webdav/", "AccType": "webdav",
|
||||
"AccKey": "123", "AccUser": "admin", "AccPass": "photoprism", "AccError": "", "AccShare": false, "AccSync": false, "RetryLimit": 3, "SharePath": "", "ShareSize": "", "ShareExpires": 0,
|
||||
"SyncPath": "", "SyncInterval": 5, "SyncUpload": false, "SyncDownload": false, "SyncFilenames": false, "SyncRaw": false}`)
|
||||
assert.Equal(t, http.StatusOK, r.Code)
|
||||
|
|
|
@ -74,7 +74,7 @@ func NewTestOptions() *Options {
|
|||
DatabaseDriver: dbDriver,
|
||||
DatabaseDsn: dbDsn,
|
||||
AdminPassword: "photoprism",
|
||||
OidcIssuer: "http://oidc-test-op:9998",
|
||||
OidcIssuer: "http://dummy-oidc:9998",
|
||||
OidcClientID: "native",
|
||||
OidcClientSecret: "random",
|
||||
}
|
||||
|
|
|
@ -7,11 +7,11 @@ import (
|
|||
type AccountMap map[string]Account
|
||||
|
||||
var AccountFixtures = AccountMap{
|
||||
"webdav-dummy": {
|
||||
"dummy-webdav": {
|
||||
ID: 1000000,
|
||||
AccName: "Test Account",
|
||||
AccOwner: "",
|
||||
AccURL: "http://webdav-dummy/",
|
||||
AccURL: "http://dummy-webdav/",
|
||||
AccType: "webdav",
|
||||
AccKey: "",
|
||||
AccUser: "admin",
|
||||
|
@ -36,11 +36,11 @@ var AccountFixtures = AccountMap{
|
|||
UpdatedAt: TimeStamp(),
|
||||
DeletedAt: nil,
|
||||
},
|
||||
"webdav-dummy2": {
|
||||
"dummy-webdav2": {
|
||||
ID: 1000001,
|
||||
AccName: "Test Account2",
|
||||
AccOwner: "",
|
||||
AccURL: "http://webdav-dummy/",
|
||||
AccURL: "http://dummy-webdav/",
|
||||
AccType: "webdav",
|
||||
AccKey: "",
|
||||
AccUser: "admin",
|
||||
|
@ -67,8 +67,8 @@ var AccountFixtures = AccountMap{
|
|||
},
|
||||
}
|
||||
|
||||
var AccountFixtureWebdavDummy = AccountFixtures["webdav-dummy"]
|
||||
var AccountFixtureWebdavDummy2 = AccountFixtures["webdav-dummy2"]
|
||||
var AccountFixtureWebdavDummy = AccountFixtures["dummy-webdav"]
|
||||
var AccountFixtureWebdavDummy2 = AccountFixtures["dummy-webdav2"]
|
||||
|
||||
// CreateLabelFixtures inserts known entities into the database for testing.
|
||||
func CreateAccountFixtures() {
|
||||
|
|
|
@ -116,7 +116,7 @@ func TestAccount_Delete(t *testing.T) {
|
|||
|
||||
func TestAccount_Directories(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
account := Account{AccName: "DirectoriesAccount", AccOwner: "Owner", AccURL: "http://webdav-dummy/", AccType: "webdav", AccKey: "123", AccUser: "admin", AccPass: "photoprism",
|
||||
account := Account{AccName: "DirectoriesAccount", AccOwner: "Owner", AccURL: "http://dummy-webdav/", AccType: "webdav", AccKey: "123", AccUser: "admin", AccPass: "photoprism",
|
||||
AccError: "", AccShare: true, AccSync: true, RetryLimit: 4, SharePath: "/home", ShareSize: "500", ShareExpires: 3500, SyncPath: "/sync",
|
||||
SyncInterval: 5, SyncUpload: true, SyncDownload: false, SyncFilenames: true, SyncRaw: false}
|
||||
|
||||
|
@ -141,7 +141,7 @@ func TestAccount_Directories(t *testing.T) {
|
|||
|
||||
})
|
||||
t.Run("no directory", func(t *testing.T) {
|
||||
account := Account{AccName: "DirectoriesAccount", AccOwner: "Owner", AccURL: "http://webdav-dummy/", AccType: "xxx", AccKey: "123", AccUser: "admin", AccPass: "photoprism",
|
||||
account := Account{AccName: "DirectoriesAccount", AccOwner: "Owner", AccURL: "http://dummy-webdav/", AccType: "xxx", AccKey: "123", AccUser: "admin", AccPass: "photoprism",
|
||||
AccError: "", AccShare: true, AccSync: true, RetryLimit: 4, SharePath: "/home", ShareSize: "500", ShareExpires: 3500, SyncPath: "/sync",
|
||||
SyncInterval: 5, SyncUpload: true, SyncDownload: false, SyncFilenames: true, SyncRaw: false}
|
||||
|
||||
|
|
|
@ -8,29 +8,29 @@ import (
|
|||
|
||||
func TestDiscover(t *testing.T) {
|
||||
t.Run("webdav", func(t *testing.T) {
|
||||
r, err := Discover("http://admin:photoprism@webdav-dummy/", "", "")
|
||||
r, err := Discover("http://admin:photoprism@dummy-webdav/", "", "")
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, "Webdav-Dummy", r.AccName)
|
||||
assert.Equal(t, "Dummy-Webdav", r.AccName)
|
||||
assert.Equal(t, "webdav", r.AccType)
|
||||
assert.Equal(t, "http://webdav-dummy/", r.AccURL)
|
||||
assert.Equal(t, "http://dummy-webdav/", r.AccURL)
|
||||
assert.Equal(t, "admin", r.AccUser)
|
||||
assert.Equal(t, "photoprism", r.AccPass)
|
||||
})
|
||||
|
||||
t.Run("webdav password", func(t *testing.T) {
|
||||
r, err := Discover("http://admin@webdav-dummy/", "", "photoprism")
|
||||
r, err := Discover("http://admin@dummy-webdav/", "", "photoprism")
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, "Webdav-Dummy", r.AccName)
|
||||
assert.Equal(t, "Dummy-Webdav", r.AccName)
|
||||
assert.Equal(t, "webdav", r.AccType)
|
||||
assert.Equal(t, "http://webdav-dummy/", r.AccURL)
|
||||
assert.Equal(t, "http://dummy-webdav/", r.AccURL)
|
||||
assert.Equal(t, "admin", r.AccUser)
|
||||
assert.Equal(t, "photoprism", r.AccPass)
|
||||
})
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
testUrl = "http://webdav-dummy/"
|
||||
testUrl = "http://dummy-webdav/"
|
||||
testUser = "admin"
|
||||
testPass = "photoprism"
|
||||
)
|
||||
|
|
|
@ -21,7 +21,7 @@ if [[ $1 ]] && [[ $2 ]] && [[ -z $3 ]]; then
|
|||
--platform $2 \
|
||||
--no-cache \
|
||||
--build-arg BUILD_TAG=$DOCKER_TAG \
|
||||
-f docker/$1/Dockerfile \
|
||||
-f docker/${1/-//}/Dockerfile \
|
||||
-t photoprism/$1:preview \
|
||||
--push .
|
||||
else
|
||||
|
@ -30,7 +30,7 @@ else
|
|||
--platform $2 \
|
||||
--no-cache \
|
||||
--build-arg BUILD_TAG=$3 \
|
||||
-f docker/$1/Dockerfile \
|
||||
-f docker/${1/-//}/Dockerfile \
|
||||
-t photoprism/$1:latest \
|
||||
-t photoprism/$1:$3 \
|
||||
--push .
|
||||
|
|
Loading…
Add table
Reference in a new issue