Skip to content

Commit 46847de

Browse files
authored
Merge pull request #46 from sjyothi54/revert-45-integration_testing
Revert "Integration testing"
2 parents 4714ac5 + 11cc6b8 commit 46847de

20 files changed

+71
-1548
lines changed

Makefile

+3-11
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,9 @@ test:
3030

3131
integration-test:
3232
@echo "=== $(INTEGRATION) === [ test ]: running integration tests..."
33-
@docker compose -f tests/docker-compose.yml up -d
34-
@sleep 10
35-
@go test -v -tags=integration -count 1 ./tests/postgresql_test.go -timeout 300s || (ret=$$?; docker compose -f tests/docker-compose.yml down -v && exit $$ret)
36-
@docker compose -f tests/docker-compose.yml down -v
37-
@echo "=== $(INTEGRATION) === [ test ]: running integration tests for query performance monitoring..."
38-
@echo "Starting containers for performance tests..."
39-
@docker compose -f tests/docker-compose-performance.yml up -d
40-
@sleep 30
41-
@go test -v -tags=query_performance ./tests/postgresqlperf_test.go -timeout 600s || (ret=$$?; docker compose -f tests/docker-compose-performance.yml down -v && exit $$ret)
42-
@echo "Stopping performance test containers..."
43-
@docker compose -f tests/docker-compose-performance.yml down -v
33+
@docker compose -f tests/docker-compose.yml pull
34+
@go test -v -tags=integration -count 1 ./tests/. || (ret=$$?; docker compose -f tests/docker-compose.yml down && exit $$ret)
35+
@docker compose -f tests/docker-compose.yml down
4436

4537
install: compile
4638
@echo "=== $(INTEGRATION) === [ install ]: installing bin/$(BINARY_NAME)..."

tests/docker-compose-performance.yml

-70
This file was deleted.

tests/docker-compose.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ services:
22
postgres-9-6:
33
image: postgres:9.6
44
restart: always
5-
container_name: postgres-9-6
65
environment:
76
POSTGRES_USER: postgres
87
POSTGRES_PASSWORD: example
@@ -11,14 +10,18 @@ services:
1110
postgres-latest-supported:
1211
image: postgres:17.0
1312
restart: always
14-
container_name: postgres-latest-supported
1513
environment:
1614
POSTGRES_USER: postgres
1715
POSTGRES_PASSWORD: example
1816
POSTGRES_DB: demo
1917

2018
nri-postgresql:
21-
container_name: nri-postgresql
22-
build:
23-
context: ../
24-
dockerfile: tests/perf-testing/integration/Dockerfile
19+
image: golang:1.23.4-bookworm
20+
container_name: nri_postgresql
21+
working_dir: /code
22+
depends_on:
23+
- postgres-9-6
24+
- postgres-latest-supported
25+
volumes:
26+
- ../:/code
27+
entrypoint: go run /code/src/main.go

tests/perf-testing/integration/Dockerfile

-9
This file was deleted.

tests/perf-testing/latest_supported/01-init-extensions.sql

-5
This file was deleted.

tests/perf-testing/latest_supported/02-create-database.sql

-1
This file was deleted.

tests/perf-testing/latest_supported/03-import-data.sql

-11
This file was deleted.

tests/perf-testing/latest_supported/Dockerfile

-40
This file was deleted.

tests/perf-testing/oldest_supported/01-init-extensions.sql

-5
This file was deleted.

tests/perf-testing/oldest_supported/02-create-database.sql

-1
This file was deleted.

tests/perf-testing/oldest_supported/03-import-data.sql

-11
This file was deleted.

tests/perf-testing/oldest_supported/Dockerfile

-42
This file was deleted.

0 commit comments

Comments
 (0)