Chapter 4. Cleaning Integration Test Suite (tempest) resources


Before you validate your deployments by using OpenStack Integration Test Suite (tempest), run the cleanup command with the --init-saved-state flag. This command scans your environment to discover resources, for example networks, volumes, images, flavors, projects, and users. The discovered resources are saved in a file called saved_state.json. When the tempest cleanup command is executed all resources not recorded in the saved_state.json file are deleted.

Prerequisites

  • An OpenStack environment that contains the Integration Test Suite packages. For more information, see Installing the Integration Test Suite with director.
  • An Integration Test Suite configuration that corresponds to your OpenStack environment. For more information, see Creating a workspace.
  • One or more completed Integration Test Suite validation tests.

4.1. Performing a dry run

Perform a dry run before you execute the cleanup. A dry run lists the files that Integration Test Suite would delete by a cleanup, without actually deleting any files. The dry_run.json file contains the list of files that a cleanup deletes.

Procedure

  1. Complete the dry run:

    # tempest cleanup --dry-run
  2. Review the dry_run.json file to ensure that the cleanup does not delete any files that you require for your environment.

4.2. Performing a tempest clean up

Before you run any tempest tests, you must initialize the saved state. This creates the file saved_state.json, which prevents the cleanup from deleting objects that must be kept.

Warning

If you do not run the cleanup command with the --init-saved-state flag, RHOSP objects are deleted.

If you create objects after running the cleanup command with --init-saved-state, those objects can be deleted by subsequent tempest commands.

Procedure

  1. Initialize the saved state to create the saved_state.json file:

    # tempest cleanup --init-saved-state
  2. Perform the cleanup:

    # tempest cleanup

The tempest cleanup command deletes tempest resources but does not delete projects or the tempest administrator account.

Note

You can modify the saved_state.json file to include or exclude objects that you want to retain or remove.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.