Coverage improvements: - pkg/build: 89.4% - pkg/release: 86.7% (from 36.7%) - pkg/container: 85.7% - pkg/php: 62.1% (from 26%) - pkg/devops: 56.7% (from 33.1%) - pkg/release/publishers: 54.7% Also: - Add GEMINI.md for Gemini agent guidance - Update .gitignore to exclude coverage files - Remove stray core.go at root - Add core go cov command for coverage reports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
981 B
Go
47 lines
981 B
Go
package devops
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestShellOptions_Default(t *testing.T) {
|
|
opts := ShellOptions{}
|
|
assert.False(t, opts.Console)
|
|
assert.Nil(t, opts.Command)
|
|
}
|
|
|
|
func TestShellOptions_Console(t *testing.T) {
|
|
opts := ShellOptions{
|
|
Console: true,
|
|
}
|
|
assert.True(t, opts.Console)
|
|
assert.Nil(t, opts.Command)
|
|
}
|
|
|
|
func TestShellOptions_Command(t *testing.T) {
|
|
opts := ShellOptions{
|
|
Command: []string{"ls", "-la"},
|
|
}
|
|
assert.False(t, opts.Console)
|
|
assert.Equal(t, []string{"ls", "-la"}, opts.Command)
|
|
}
|
|
|
|
func TestShellOptions_ConsoleWithCommand(t *testing.T) {
|
|
opts := ShellOptions{
|
|
Console: true,
|
|
Command: []string{"echo", "hello"},
|
|
}
|
|
assert.True(t, opts.Console)
|
|
assert.Equal(t, []string{"echo", "hello"}, opts.Command)
|
|
}
|
|
|
|
func TestShellOptions_EmptyCommand(t *testing.T) {
|
|
opts := ShellOptions{
|
|
Command: []string{},
|
|
}
|
|
assert.False(t, opts.Console)
|
|
assert.Empty(t, opts.Command)
|
|
assert.Len(t, opts.Command, 0)
|
|
}
|