// Copyright 2024 Matthew Rich . All rights reserved. package main import ( "github.com/stretchr/testify/assert" "os" "os/exec" "testing" "errors" ) func TestCli(t *testing.T) { if _, e := os.Stat("./decl"); errors.Is(e, os.ErrNotExist) { t.Skip("cli not built") } yaml, cliErr := exec.Command("./decl", "-import-resource", "file://decl").Output() assert.Nil(t, cliErr) assert.Greater(t, len(yaml), 0) }