Skip to content

Smoke tests for the infrastructure of the Rust project

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rust-lang/infra-smoke-tests

✔️ Smoke Tests for Rust Infrastructure

This repository contains a collection of smoke tests for the infrastructure of the Rust project. The tests mostly check that the Content Delivery Networks that the project uses for its releases and crates return the expected responses.

$ just run
✅ crates.io
  ✅ rust-lang/crates.io#4891 - Encoded + character
    ✅ CloudFront encoded
    ✅ CloudFront unencoded
    ✅ CloudFront with space
    ✅ Fastly encoded
    ✅ Fastly unencoded
    ✅ Fastly with space
  ✅ rust-lang/crates.io#6164 - CORS headers
    ✅ CloudFront
    ✅ Fastly
  ✅ Database dumps
    ✅ CloudFront
    ✅ Fastly

✅ rustup
  ✅ rustup.sh
    ✅ CloudFront
    ✅ Fastly
  ✅ win.rustup.rs
    ✅ aarch64
    ✅ i686
    ✅ x86_64

Usage

This project uses Just as a command runner. It is recommended to install and use it with this project, but the commands that just runs can also be copied from the Justfile at the root of the repository.

The smoke tests can be run with the following command:

just run

The tests can be run against either the staging or production environment by specifying it as an argument. By default, tests are run against staging.

just run --env production

The smoke tests are organized in the following way:

  • Test suites execute tests for a specific service, for example crates.io orrustup.
  • Each test suite has one or more test groups, which are collections of tests that check a specific aspect of the service. Usually, they correspond to a feature or a bug that was fixed in the past.
  • Each test group has one or more tests, which usually execute a single HTTP request and check the response. A common pattern is to have a test for each CDN, for example.

If a test fails, the test failure and its error message will be bubbled up the chain and mark the whole test suite as failed.

Development

The repository contains a set of tools that enforce a consistent coding style, run automated tests, and check for common programming errors. Pre-commit hooks run these checks on the local machine when committing changes, while GitHub Actions run the same checks when a pull request is opened.

The pre-commit hooks are managed by pre-commit and can be installed with the following command:

pre-commit install

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Smoke tests for the infrastructure of the Rust project

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •