Fork channel

Create a new channel as a copy of main.

Rename channel

Rename main to:

Delete channel

Delete main? This cannot be undone.

resolve_test.go
package db

import "testing"

func TestResolveDBPath(t *testing.T) {
	t.Run("non-empty input returns input", func(t *testing.T) {
		got := ResolveDBPath("/custom/path.duckdb", "/default.duckdb")
		if got != "/custom/path.duckdb" {
			t.Errorf("got %q, want /custom/path.duckdb", got)
		}
	})

	t.Run("empty input returns fallback", func(t *testing.T) {
		got := ResolveDBPath("", "/default.duckdb")
		if got != "/default.duckdb" {
			t.Errorf("got %q, want /default.duckdb", got)
		}
	})

	t.Run("both empty returns empty", func(t *testing.T) {
		got := ResolveDBPath("", "")
		if got != "" {
			t.Errorf("got %q, want empty string", got)
		}
	})
}