github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/agent/debug/host_test.go (about)

     1  package debug
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestCollectHostInfo(t *testing.T) {
    10  	assert := assert.New(t)
    11  
    12  	host := CollectHostInfo()
    13  
    14  	assert.Nil(host.Errors)
    15  
    16  	assert.NotNil(host.CollectionTime)
    17  	assert.NotNil(host.Host)
    18  	assert.NotNil(host.Disk)
    19  	assert.NotNil(host.Memory)
    20  }