Files
snack/detect/detect_integration_test.go
Tai Groot b443269594 feat: add integration tests and GitHub Actions CI
Add integration test files for all providers (apt, dpkg, pacman, apk,
dnf, rpm, flatpak, snap, pkg, detect) behind the 'integration' build
tag. Tests exercise real package operations: update, search, info,
install, verify, list, remove, and capability interfaces.

Add GitHub Actions workflow running unit tests on ubuntu-latest and
integration tests on Debian, Ubuntu, Fedora, Alpine, Arch Linux, and
Ubuntu+Flatpak containers/runners.
2026-02-26 01:42:19 +00:00

30 lines
584 B
Go

//go:build integration
package detect_test
import (
"testing"
"github.com/gogrlx/snack"
"github.com/gogrlx/snack/detect"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestIntegration_Detect(t *testing.T) {
mgr, err := detect.Default()
require.NoError(t, err)
require.NotNil(t, mgr)
t.Logf("Detected: %s", mgr.Name())
all := detect.All()
require.NotEmpty(t, all)
for _, m := range all {
t.Logf("Available: %s", m.Name())
}
caps := snack.GetCapabilities(mgr)
t.Logf("Capabilities: %+v", caps)
assert.NotEmpty(t, mgr.Name())
}