memory_test.go 360 B

1234567891011121314151617181920
  1. package node
  2. import (
  3. "github.com/stretchr/testify/assert"
  4. "testing"
  5. )
  6. func TestNode_memory(t *testing.T) {
  7. m, err := memoryInfo("fixtures/proc")
  8. assert.Nil(t, err)
  9. assert.Equal(t,
  10. MemoryStat{
  11. TotalBytes: 65871236 * 1000,
  12. FreeBytes: 7540732 * 1000,
  13. AvailableBytes: 23826720 * 1000,
  14. CachedBytes: 15878036 * 1000,
  15. },
  16. m,
  17. )
  18. }