bundle_test.go 342 B

123456789101112131415161718192021
  1. package bundle_entities
  2. import (
  3. "testing"
  4. "github.com/langgenius/dify-plugin-daemon/internal/utils/parser"
  5. )
  6. func TestAvoidNilTags(t *testing.T) {
  7. yaml := `name: test
  8. `
  9. bundle, err := parser.UnmarshalYamlBytes[Bundle]([]byte(yaml))
  10. if err != nil {
  11. t.Fatal(err)
  12. }
  13. if bundle.Tags == nil {
  14. t.Fatal("tags should not be nil")
  15. }
  16. }