Skip to content

Commit

Permalink
Instructions for running integration tests (#4260)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleg Pudeyev <[email protected]>
  • Loading branch information
p-datadog and p authored Jan 10, 2025
1 parent 7f8e8fd commit 42a7173
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
46 changes: 46 additions & 0 deletions integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,52 @@ The `images/` folders hosts some images for Ruby applications.

Ruby base images include `Datadog::DemoEnv` and other helpers.

### Running Integration Tests

1. Pick an application to run the tests against:

```
cd apps/rails-seven
```

2. Pick a Ruby version and build Docker images:

```
./script/build-images -v 3.3
```

Note: you need to build the images using this command whenever you make
any changes in the source code.

3. Run integration test script:

```
./script/ci -v 3.3
```

### Running Integration Tests Not In Docker

Run the test application manually (in a separate terminal):

```
cd apps/rails-seven
export RUBYOPT=-I../../images/include
# Use local dd-trace-rb tree
export DD_DEMO_ENV_GEM_LOCAL_DATADOG=../../..
export DATABASE_URL=mysql2://user:password@localhost:3306
bundle exec rake db:create db:migrate
bundle exec rails server -p 3000
```
Run the tests:
```
cd apps/rails-seven
export RUBYOPT=-I../../images/include
export TEST_INTEGRATION=1 TEST_HOSTNAME=localhost TEST_PORT=3000
bundle exec rspec
```
### Debugging
#### Profiling memory
Expand Down
2 changes: 2 additions & 0 deletions integration/apps/rails-seven/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@
# Ignore local variables
/index.html*
.envrc

db/schema.rb

0 comments on commit 42a7173

Please sign in to comment.