github.com/verrazzano/verrazzano@v1.7.1/tools/vz/pkg/internal/util/report/action_test.go (about)

     1  // Copyright (c) 2021, 2024, Oracle and/or its affiliates.
     2  // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  package report
     4  
     5  import (
     6  	"testing"
     7  
     8  	"github.com/stretchr/testify/assert"
     9  	"github.com/verrazzano/verrazzano/tools/vz/pkg/internal/util/log"
    10  )
    11  
    12  func TestActionValidate(t *testing.T) {
    13  	logger := log.GetDebugEnabledLogger()
    14  	a := Action{
    15  		Summary: "",
    16  		Links:   []string{"l1"},
    17  		Steps:   []string{"s1"},
    18  	}
    19  	assert.Error(t, a.Validate(logger))
    20  	a.Summary = "S1"
    21  	assert.NoError(t, a.Validate(logger))
    22  }