Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for running integration tests #4260

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading