Skip to content

Commit

Permalink
Merge branch 'main' into deprecate
Browse files Browse the repository at this point in the history
# Conflicts:
#	.dev/ferretdb2.Dockerfile
#	.dev/postgres.Dockerfile
  • Loading branch information
AlekSi committed Jan 30, 2025
2 parents 22acd2a + dac2dab commit 89e3973
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 39 deletions.
33 changes: 13 additions & 20 deletions .dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,23 @@
# This file is used by integration tests.

services:
mongodb:
database:
build:
context: .
dockerfile: ${MONGO_DOCKERFILE:-mongo}.Dockerfile
dockerfile: ${DOCKERFILE:-mongo}.Dockerfile
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=username
- MONGO_INITDB_ROOT_PASSWORD=password
# MongoDB
MONGO_INITDB_ROOT_USERNAME: username
MONGO_INITDB_ROOT_PASSWORD: password

- FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/postgres
- FERRETDB_SETUP_USERNAME=username
- FERRETDB_SETUP_PASSWORD=password
- FERRETDB_SETUP_DATABASE=admin
- FERRETDB_TEST_ENABLE_NEW_AUTH=true
# FerretDB v1
FERRETDB_SETUP_USERNAME: username
FERRETDB_SETUP_PASSWORD: password
FERRETDB_SETUP_DATABASE: admin
FERRETDB_TEST_ENABLE_NEW_AUTH: true

postgres:
build:
context: .
dockerfile: ${POSTGRES_DOCKERFILE:-postgres}.Dockerfile
platform: linux/amd64
ports:
- 5432:5432
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
# PostgreSQL for FerretDB v2
POSTGRES_USER: username
POSTGRES_PASSWORD: password
2 changes: 1 addition & 1 deletion .dev/ferretdb1.Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/ferretdb/ferretdb:1.24.0
FROM ghcr.io/ferretdb/all-in-one:1.24.0
2 changes: 1 addition & 1 deletion .dev/ferretdb2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/ferretdb/ferretdb:2.0.0-rc.1
FROM --platform=linux/amd64 ghcr.io/ferretdb/ferretdb-eval:2.0.0-rc.1
1 change: 0 additions & 1 deletion .dev/postgres.Dockerfile

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ env:

jobs:
test:
name: Test ${{ matrix.mongo_dockerfile }}
name: Test ${{ matrix.dockerfile }}
runs-on: ubuntu-24.04
timeout-minutes: 15

# Do not run this job in parallel for any PR change or branch push.
concurrency:
group: ${{ github.workflow }}-test-${{ matrix.mongo_dockerfile }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow }}-test-${{ matrix.dockerfile }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'not ready')

strategy:
fail-fast: false
matrix:
mongo_dockerfile: [mongo, ferretdb1, ferretdb2]
dockerfile: [mongo, ferretdb1, ferretdb2]

steps:
# TODO https://github.com/FerretDB/github-actions/issues/211
Expand Down Expand Up @@ -66,8 +66,7 @@ jobs:
- name: Start development environment
run: bin/task env-up-detach
env:
MONGO_DOCKERFILE: ${{ matrix.mongo_dockerfile }}
POSTGRES_DOCKERFILE: postgres
DOCKERFILE: ${{ matrix.dockerfile }}

- name: Run all tests
run: bin/task test
Expand Down
11 changes: 0 additions & 11 deletions wireclient/wireclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@ func TestConn(t *testing.T) {
assert.Error(t, conn.Login(ctx, "invalid", "invalid", "admin"))
})

t.Run("InvalidDatabase", func(t *testing.T) {
conn := ConnectPing(ctx, uri, logger(t))
require.NotNil(t, conn)

t.Cleanup(func() {
require.NoError(t, conn.Close())
})

assert.Error(t, conn.Login(ctx, "username", "password", "invalid"))
})

t.Run("Valid", func(t *testing.T) {
conn := ConnectPing(ctx, uri, logger(t))
require.NotNil(t, conn)
Expand Down

0 comments on commit 89e3973

Please sign in to comment.