purge mentions of the faux-username from the codebase

This commit is contained in:
Tomas Hromada
2020-11-21 21:17:55 +01:00
parent 4170c0b993
commit bc5985881a
6 changed files with 24 additions and 24 deletions

View File

@@ -203,7 +203,7 @@ DOKKU_REDIS_LOLIPOP_PORT_6379_TCP_ADDR=172.17.0.1
The following will be set on the linked application by default: The following will be set on the linked application by default:
``` ```
REDIS_URL=redis://lolipop:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop REDIS_URL=redis://:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop
``` ```
The host exposed here only works internally in docker containers. If you want your container to be reachable from outside, you should use the 'expose' subcommand. Another service can be linked to your app: The host exposed here only works internally in docker containers. If you want your container to be reachable from outside, you should use the 'expose' subcommand. Another service can be linked to your app:
@@ -222,7 +222,7 @@ dokku redis:link lolipop playground
This will cause `REDIS_URL` to be set as: This will cause `REDIS_URL` to be set as:
``` ```
redis2://lolipop:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop redis2://:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop
``` ```
### unlink the redis service from the app ### unlink the redis service from the app
@@ -312,7 +312,7 @@ dokku redis:promote <service> <app>
If you have a redis service linked to an app and try to link another redis service another link environment variable will be generated automatically: If you have a redis service linked to an app and try to link another redis service another link environment variable will be generated automatically:
``` ```
DOKKU_REDIS_BLUE_URL=redis://other_service:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service DOKKU_REDIS_BLUE_URL=redis://:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service
``` ```
You can promote the new service to be the primary one: You can promote the new service to be the primary one:
@@ -326,9 +326,9 @@ dokku redis:promote other_service playground
This will replace `REDIS_URL` with the url from other_service and generate another environment variable to hold the previous value if necessary. You could end up with the following for example: This will replace `REDIS_URL` with the url from other_service and generate another environment variable to hold the previous value if necessary. You could end up with the following for example:
``` ```
REDIS_URL=redis://other_service:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service REDIS_URL=redis://:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service
DOKKU_REDIS_BLUE_URL=redis://other_service:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service DOKKU_REDIS_BLUE_URL=redis://:ANOTHER_PASSWORD@dokku-redis-other-service:6379/other_service
DOKKU_REDIS_SILVER_URL=redis://lolipop:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop DOKKU_REDIS_SILVER_URL=redis://:SOME_PASSWORD@dokku-redis-lolipop:6379/lolipop
``` ```
### start a previously stopped redis service ### start a previously stopped redis service

View File

@@ -23,7 +23,7 @@ service-link-cmd() {
#E #E
#E the following will be set on the linked application by default: #E the following will be set on the linked application by default:
#E #E
#E ${PLUGIN_DEFAULT_ALIAS}_URL=${PLUGIN_SCHEME}://lolipop:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop #E ${PLUGIN_DEFAULT_ALIAS}_URL=${PLUGIN_SCHEME}://:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop
#E #E
#E the host exposed here only works internally in docker containers. #E the host exposed here only works internally in docker containers.
#E if you want your container to be reachable from outside, you should #E if you want your container to be reachable from outside, you should
@@ -37,7 +37,7 @@ service-link-cmd() {
#E dokku $PLUGIN_COMMAND_PREFIX:link lolipop playground #E dokku $PLUGIN_COMMAND_PREFIX:link lolipop playground
#E this will cause ${PLUGIN_DEFAULT_ALIAS}_URL to be set as: #E this will cause ${PLUGIN_DEFAULT_ALIAS}_URL to be set as:
#E #E
#E ${PLUGIN_SCHEME}2://lolipop:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop #E ${PLUGIN_SCHEME}2://:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop
#A service, service to run command against #A service, service to run command against
#A app, app to run command against #A app, app to run command against
#F -a|--alias "BLUE_DATABASE", an alternative alias to use for linking to an app via environment variable #F -a|--alias "BLUE_DATABASE", an alternative alias to use for linking to an app via environment variable

View File

@@ -9,7 +9,7 @@ service-promote-cmd() {
#E if you have a $PLUGIN_COMMAND_PREFIX service linked to an app and try to link another $PLUGIN_COMMAND_PREFIX service #E if you have a $PLUGIN_COMMAND_PREFIX service linked to an app and try to link another $PLUGIN_COMMAND_PREFIX service
#E another link environment variable will be generated automatically: #E another link environment variable will be generated automatically:
#E #E
#E DOKKU_${PLUGIN_DEFAULT_ALIAS}_BLUE_URL=${PLUGIN_SCHEME}://other_service:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service #E DOKKU_${PLUGIN_DEFAULT_ALIAS}_BLUE_URL=${PLUGIN_SCHEME}://:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service
#E #E
#E you can promote the new service to be the primary one #E you can promote the new service to be the primary one
#E > NOTE: this will restart your app #E > NOTE: this will restart your app
@@ -18,9 +18,9 @@ service-promote-cmd() {
#E another environment variable to hold the previous value if necessary. #E another environment variable to hold the previous value if necessary.
#E you could end up with the following for example: #E you could end up with the following for example:
#E #E
#E ${PLUGIN_DEFAULT_ALIAS}_URL=${PLUGIN_SCHEME}://other_service:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service #E ${PLUGIN_DEFAULT_ALIAS}_URL=${PLUGIN_SCHEME}://:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service
#E DOKKU_${PLUGIN_DEFAULT_ALIAS}_BLUE_URL=${PLUGIN_SCHEME}://other_service:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service #E DOKKU_${PLUGIN_DEFAULT_ALIAS}_BLUE_URL=${PLUGIN_SCHEME}://:ANOTHER_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-other-service:${PLUGIN_DATASTORE_PORTS[0]}/other_service
#E DOKKU_${PLUGIN_DEFAULT_ALIAS}_SILVER_URL=${PLUGIN_SCHEME}://lolipop:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop #E DOKKU_${PLUGIN_DEFAULT_ALIAS}_SILVER_URL=${PLUGIN_SCHEME}://:SOME_PASSWORD@dokku-${PLUGIN_COMMAND_PREFIX}-lolipop:${PLUGIN_DATASTORE_PORTS[0]}/lolipop
#A service, service to run command against #A service, service to run command against
#A app, app to run command against #A app, app to run command against
declare desc="promote service <service> as ${PLUGIN_DEFAULT_ALIAS}_URL in <app>" declare desc="promote service <service> as ${PLUGIN_DEFAULT_ALIAS}_URL in <app>"

View File

@@ -22,21 +22,21 @@ teardown() {
@test "($PLUGIN_COMMAND_PREFIX:info) success" { @test "($PLUGIN_COMMAND_PREFIX:info) success" {
run dokku "$PLUGIN_COMMAND_PREFIX:info" l run dokku "$PLUGIN_COMMAND_PREFIX:info" l
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_contains "${lines[*]}" "redis://l:$password@dokku-redis-l:6379" assert_contains "${lines[*]}" "redis://:$password@dokku-redis-l:6379"
} }
@test "($PLUGIN_COMMAND_PREFIX:info) replaces underscores by dash in hostname" { @test "($PLUGIN_COMMAND_PREFIX:info) replaces underscores by dash in hostname" {
dokku "$PLUGIN_COMMAND_PREFIX:create" test_with_underscores dokku "$PLUGIN_COMMAND_PREFIX:create" test_with_underscores
run dokku "$PLUGIN_COMMAND_PREFIX:info" test_with_underscores run dokku "$PLUGIN_COMMAND_PREFIX:info" test_with_underscores
password="$(sudo cat "$PLUGIN_DATA_ROOT/test_with_underscores/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/test_with_underscores/PASSWORD")"
assert_contains "${lines[*]}" "redis://test_with_underscores:$password@dokku-redis-test-with-underscores:6379" assert_contains "${lines[*]}" "redis://:$password@dokku-redis-test-with-underscores:6379"
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" test_with_underscores dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" test_with_underscores
} }
@test "($PLUGIN_COMMAND_PREFIX:info) success with flag" { @test "($PLUGIN_COMMAND_PREFIX:info) success with flag" {
run dokku "$PLUGIN_COMMAND_PREFIX:info" l --dsn run dokku "$PLUGIN_COMMAND_PREFIX:info" l --dsn
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_output "redis://l:$password@dokku-redis-l:6379" assert_output "redis://:$password@dokku-redis-l:6379"
run dokku "$PLUGIN_COMMAND_PREFIX:info" l --config-dir run dokku "$PLUGIN_COMMAND_PREFIX:info" l --config-dir
assert_success assert_success

View File

@@ -63,7 +63,7 @@ teardown() {
echo "status: $status" echo "status: $status"
url=$(dokku config:get my_app REDIS_URL) url=$(dokku config:get my_app REDIS_URL)
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_contains "$url" "redis://l:$password@dokku-redis-l:6379" assert_contains "$url" "redis://:$password@dokku-redis-l:6379"
assert_success assert_success
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
} }
@@ -96,7 +96,7 @@ teardown() {
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
url=$(dokku config:get my_app REDIS_URL) url=$(dokku config:get my_app REDIS_URL)
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_contains "$url" "redis2://l:$password@dokku-redis-l:6379" assert_contains "$url" "redis2://:$password@dokku-redis-l:6379"
assert_success assert_success
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
} }
@@ -113,7 +113,7 @@ teardown() {
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app --alias "ALIAS" dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app --alias "ALIAS"
url=$(dokku config:get my_app ALIAS_URL) url=$(dokku config:get my_app ALIAS_URL)
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_contains "$url" "redis://l:$password@dokku-redis-l:6379" assert_contains "$url" "redis://:$password@dokku-redis-l:6379"
assert_success assert_success
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
} }

View File

@@ -40,15 +40,15 @@ teardown() {
@test "($PLUGIN_COMMAND_PREFIX:promote) changes REDIS_URL" { @test "($PLUGIN_COMMAND_PREFIX:promote) changes REDIS_URL" {
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
dokku config:set my_app "REDIS_URL=redis://u:p@host:6379/db" "DOKKU_REDIS_BLUE_URL=redis://l:$password@dokku-redis-l:6379" dokku config:set my_app "REDIS_URL=redis://:p@host:6379/db" "DOKKU_REDIS_BLUE_URL=redis://:$password@dokku-redis-l:6379"
dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app
url=$(dokku config:get my_app REDIS_URL) url=$(dokku config:get my_app REDIS_URL)
assert_equal "$url" "redis://l:$password@dokku-redis-l:6379" assert_equal "$url" "redis://:$password@dokku-redis-l:6379"
} }
@test "($PLUGIN_COMMAND_PREFIX:promote) creates new config url when needed" { @test "($PLUGIN_COMMAND_PREFIX:promote) creates new config url when needed" {
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
dokku config:set my_app "REDIS_URL=redis://u:p@host:6379/db" "DOKKU_REDIS_BLUE_URL=redis://l:$password@dokku-redis-l:6379" dokku config:set my_app "REDIS_URL=redis://:p@host:6379/db" "DOKKU_REDIS_BLUE_URL=redis://:$password@dokku-redis-l:6379"
dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app
run dokku config my_app run dokku config my_app
assert_contains "${lines[*]}" "DOKKU_REDIS_" assert_contains "${lines[*]}" "DOKKU_REDIS_"
@@ -56,8 +56,8 @@ teardown() {
@test "($PLUGIN_COMMAND_PREFIX:promote) uses REDIS_DATABASE_SCHEME variable" { @test "($PLUGIN_COMMAND_PREFIX:promote) uses REDIS_DATABASE_SCHEME variable" {
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")" password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
dokku config:set my_app "REDIS_DATABASE_SCHEME=redis2" "REDIS_URL=redis://u:p@host:6379" "DOKKU_REDIS_BLUE_URL=redis2://l:$password@dokku-redis-l:6379" dokku config:set my_app "REDIS_DATABASE_SCHEME=redis2" "REDIS_URL=redis://:p@host:6379" "DOKKU_REDIS_BLUE_URL=redis2://:$password@dokku-redis-l:6379"
dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app dokku "$PLUGIN_COMMAND_PREFIX:promote" l my_app
url=$(dokku config:get my_app REDIS_URL) url=$(dokku config:get my_app REDIS_URL)
assert_equal "$url" "redis2://l:$password@dokku-redis-l:6379" assert_equal "$url" "redis2://:$password@dokku-redis-l:6379"
} }