mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Sync build tags in *_test.go (#2767)
Ensure that unwanted tests are correctly excluded when various build tags are specified, i.e. when the code that they test would be excluded from compilation. Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
This commit is contained in:
parent
3fb5f70b0c
commit
37ce0bab8c
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nobonding
|
||||
// +build !nobonding
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nodiskstats
|
||||
// +build !nodiskstats
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !noethtool
|
||||
// +build !noethtool
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nofilefd
|
||||
// +build !nofilefd
|
||||
|
||||
package collector
|
||||
|
||||
import "testing"
|
||||
|
|
|
@ -11,14 +11,17 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nofilesystem
|
||||
// +build !nofilesystem
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
"github.com/go-kit/log"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/alecthomas/kingpin/v2"
|
||||
"github.com/go-kit/log"
|
||||
)
|
||||
|
||||
func Test_parseFilesystemLabelsError(t *testing.T) {
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nointerrupts
|
||||
// +build !nointerrupts
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !noipvs
|
||||
// +build !noipvs
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !noloadavg
|
||||
// +build !noloadavg
|
||||
|
||||
package collector
|
||||
|
||||
import "testing"
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nologind
|
||||
// +build !nologind
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nomeminfo
|
||||
// +build !nomeminfo
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nomeminfo_numa
|
||||
// +build !nomeminfo_numa
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nonetdev
|
||||
// +build !nonetdev
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nonetstat
|
||||
// +build !nonetstat
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !noprocesses
|
||||
// +build !noprocesses
|
||||
//go:build !noperf
|
||||
// +build !noperf
|
||||
|
||||
package collector
|
||||
|
||||
|
@ -24,7 +24,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/go-kit/log"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !nosystemd
|
||||
// +build !nosystemd
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !notcpstat
|
||||
// +build !notcpstat
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !notextfile
|
||||
// +build !notextfile
|
||||
|
||||
package collector
|
||||
|
||||
import (
|
||||
|
|
Loading…
Reference in a new issue