mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-25 06:06:35 +00:00
container: support hostprocess containers and expose kubernetes labels (#1911)
This commit is contained in:
@@ -28,7 +28,6 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/pkg/collector"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -70,7 +69,7 @@ func TestMultipleDirectories(t *testing.T) {
|
||||
require.NoError(t, <-errCh)
|
||||
|
||||
for _, f := range []string{"dir1", "dir2", "dir3", "dir3sub"} {
|
||||
assert.Contains(t, got, f)
|
||||
require.Contains(t, got, f)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +105,6 @@ func TestDuplicateFileName(t *testing.T) {
|
||||
|
||||
require.ErrorContains(t, <-errCh, "duplicate filename detected")
|
||||
|
||||
assert.Contains(t, got, "file")
|
||||
assert.NotContains(t, got, "sub_file")
|
||||
require.Contains(t, got, "file")
|
||||
require.NotContains(t, got, "sub_file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user