...

Source file src/github.com/launchdarkly/go-server-sdk/v6/internal/datasource/null_data_source_test.go

Documentation: github.com/launchdarkly/go-server-sdk/v6/internal/datasource

     1  package datasource
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestNullDataSource(t *testing.T) {
    10  	d := NewNullDataSource()
    11  	assert.True(t, d.IsInitialized())
    12  
    13  	ch := make(chan struct{})
    14  	d.Start(ch)
    15  	_, ok := <-ch
    16  	assert.False(t, ok)
    17  
    18  	assert.Nil(t, d.Close())
    19  }
    20  

View as plain text