Skip to content

Commit

Permalink
Refactored to utilize the mariadbHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
CGoodwin90 committed Jun 3, 2024
1 parent ae62723 commit 71dbf94
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 80 deletions.
8 changes: 8 additions & 0 deletions TESTING_dockercompose.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mariadb?servic
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mariadb?service=mariadb-10-11" | grep "SERVICE_HOST=10.11"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mariadb?service=mariadb-10-11" | grep "LAGOON_TEST_VAR=internal-services-test"

# mysql-8-0 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mysql?service=mysql-8-0" | grep "SERVICE_HOST=8.0.34"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mysql?service=mysql-8-0" | grep "LAGOON_TEST_VAR=internal-services-test"

# mysql-8-4 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mysql?service=mysql-8-4" | grep "SERVICE_HOST=8.4.0"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/mysql?service=mysql-8-4" | grep "LAGOON_TEST_VAR=internal-services-test"

# postgres-12 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/postgres?service=postgres-12" | grep "SERVICE_HOST=PostgreSQL 12"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/postgres?service=postgres-12" | grep "LAGOON_TEST_VAR=internal-services-test"
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ services:
ports:
- '5432'

mysql-5-7:
image: testlagoon/mysql-5.7:experimental
mysql-8-0:
image: testlagoon/mysql-8.0:experimental
labels:
lagoon.type: mariadb
ports:
- "3306"

mysql-8-0:
image: testlagoon/mysql-8.0:experimental
mysql-8-4:
image: testlagoon/mysql-8.4:pr-308 # Placeholder
labels:
lagoon.type: mariadb
ports:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
r.HandleFunc("/mongo", mongoHandler)
r.HandleFunc("/opensearch", opensearchHandler)
r.HandleFunc("/storage", persistentStorageHandler)
r.HandleFunc("/mysql", mysqlHandler)
r.HandleFunc("/mysql", mariadbHandler)
r.HandleFunc("/", handleReq)
http.Handle("/", r)

Expand Down
75 changes: 0 additions & 75 deletions mysql.go

This file was deleted.

0 comments on commit 71dbf94

Please sign in to comment.