hostmetrics_others_test.go 366 B

1234567891011121314151617181920
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. //go:build !linux
  4. package hostmetricsreceiver
  5. import (
  6. "testing"
  7. "github.com/stretchr/testify/assert"
  8. )
  9. func TestRootPathNotAllowedOnOS(t *testing.T) {
  10. assert.NotNil(t, validateRootPath("testdata"))
  11. }
  12. func TestRootPathUnset(t *testing.T) {
  13. assert.Nil(t, validateRootPath(""))
  14. }