Skip to main content

3 posts tagged with "testing"

View All Tags

Testing PostgreSQL Schemas with pgTAP and Atlas

· 7 min read
Noa Rogoszinski
Noa Rogoszinski
DevRel Engineer

Testing your database schema shouldn't be an afterthought. Automating checks on your objects, constraints, and functions is critical to catching breaking changes before they hit production.

Enter pgTAP—which relies on traditional runtime assertions in an ephemeral database—and Atlas—which leverages a modern, declarative approach. This post breaks down how both tools handle schema testing and explains when you should swap out heavy runtime assertions for Atlas's lightweight lint rules.

Strategies for Reliable Schema Migrations

· 12 min read
Rotem Tamir
Building Atlas

Adapted from a talk given at Kube Native 2024:

Introduction

Database schema migrations are a critical part of the software development lifecycle. They allow us to evolve our data model as our application grows and changes. However, migrations can also be a significant source of risk and downtime if not handled carefully.

Despite teams applying all the common best practices, such as using a migration tool to automate changes and carefully examining each migration before approving it during code review, issues still slip through the cracks, making migrations a source of significant headaches for many engineering teams.

This post explores five strategies for making database schema migrations more reliable by introducing Atlas, a database schema-as-code tool that helps teams make their database schema changes both safer and easier to manage.

How Go Tests "go test"

· 21 min read
Rotem Tamir
Building Atlas

Adapted from a talk given at GopherCon Israel 2024

Introduction

How does Go, the project, and team behind it, test go test, the Go tool's command for running tests? Does Go test go test using the go test command? In this article, we explore the evolution of how the Go team tests the Go tool (go) and discuss strategies for testing command-line tools written in Go in general.