...

Source file src/edge-infra.dev/test/fixtures/fixtures_test.go

Documentation: edge-infra.dev/test/fixtures

     1  package fixtures
     2  
     3  import (
     4  	"strings"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestCRDLoading(t *testing.T) {
    11  	crds, err := LoadCRDs()
    12  	assert.NoError(t, err)
    13  	assert.NotEmpty(t, crds)
    14  	for _, crd := range crds {
    15  		assert.NotNil(t, crd)
    16  	}
    17  }
    18  
    19  func TestCRDLoading_Only(t *testing.T) {
    20  	crds, err := LoadCRDs(Only("edge"))
    21  	assert.NoError(t, err)
    22  	assert.NotEmpty(t, crds)
    23  	for _, crd := range crds {
    24  		assert.True(t, strings.Contains(crd.GetName(), "edge"))
    25  	}
    26  }
    27  

View as plain text