diff --git a/internal/commands/show_config_options_test.go b/internal/commands/show_config_options_test.go new file mode 100644 index 000000000..4387bd78a --- /dev/null +++ b/internal/commands/show_config_options_test.go @@ -0,0 +1,26 @@ +package commands + +import ( + "github.com/photoprism/photoprism/internal/config" + "github.com/photoprism/photoprism/pkg/capture" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestShowConfigOptionsCommand(t *testing.T) { + var err error + + ctx := config.CliTestContext() + + output := capture.Output(func() { + err = ShowConfigOptionsCommand.Run(ctx) + }) + + if err != nil { + t.Fatal(err) + } + + assert.Contains(t, output, "PHOTOPRISM_IMPORT_PATH") + assert.Contains(t, output, "--sidecar-path") + assert.Contains(t, output, "sidecar `PATH` *optional*") +} diff --git a/internal/commands/show_config_yaml_test.go b/internal/commands/show_config_yaml_test.go new file mode 100644 index 000000000..14d97819a --- /dev/null +++ b/internal/commands/show_config_yaml_test.go @@ -0,0 +1,25 @@ +package commands + +import ( + "github.com/photoprism/photoprism/internal/config" + "github.com/photoprism/photoprism/pkg/capture" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestShowConfigYamlCommand(t *testing.T) { + var err error + + ctx := config.CliTestContext() + + output := capture.Output(func() { + err = ShowConfigYamlCommand.Run(ctx) + }) + + if err != nil { + t.Fatal(err) + } + + assert.Contains(t, output, "ImportPath") + assert.Contains(t, output, "--sidecar-path") +}