mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 17:23:08 +00:00
45 lines
2.1 KiB
Diff
45 lines
2.1 KiB
Diff
From bea6307ec2a77d90d59c13940381d73ec0f05b70 Mon Sep 17 00:00:00 2001
|
|
From: Graham Christensen <graham@grahamc.com>
|
|
Date: Mon, 1 Mar 2021 10:57:44 -0500
|
|
Subject: [PATCH] Disable NIC tests that fail in the Nix sandbox.
|
|
|
|
---
|
|
agent/managedInstances/fingerprint/fingerprint_integ_test.go | 2 ++
|
|
agent/ssm/service_test.go | 1 +
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/agent/managedInstances/fingerprint/fingerprint_integ_test.go b/agent/managedInstances/fingerprint/fingerprint_integ_test.go
|
|
index a1f969ff..631ea1f5 100644
|
|
--- a/agent/managedInstances/fingerprint/fingerprint_integ_test.go
|
|
+++ b/agent/managedInstances/fingerprint/fingerprint_integ_test.go
|
|
@@ -28,12 +28,14 @@ func TestHostnameInfo(t *testing.T) {
|
|
}
|
|
|
|
func TestPrimaryIpInfo(t *testing.T) {
|
|
+ t.Skip("The Nix build sandbox has no non-loopback IPs, causing this test to fail.");
|
|
ip, err := primaryIpInfo()
|
|
assert.NoError(t, err, "expected no error fetching the primary ip")
|
|
assert.NotEmpty(t, ip, "expected to fetch primary ip")
|
|
}
|
|
|
|
func TestMacAddrInfo(t *testing.T) {
|
|
+ t.Skip("The Nix build sandbox has no non-loopback interfaces, causing this test to fail.");
|
|
mac, err := macAddrInfo()
|
|
assert.NoError(t, err, "expected no error fetching the mac addr")
|
|
assert.NotEmpty(t, mac, "expected to fetch mac address")
|
|
diff --git a/agent/ssm/service_test.go b/agent/ssm/service_test.go
|
|
index f4b34f83..d8216dba 100644
|
|
--- a/agent/ssm/service_test.go
|
|
+++ b/agent/ssm/service_test.go
|
|
@@ -85,6 +85,7 @@ func (suite *SsmServiceTestSuite) TestUpdateEmptyInstanceInformation() {
|
|
// Test function for update instance information
|
|
// This function update the agent name, agent statuc, and agent version.
|
|
func (suite *SsmServiceTestSuite) TestUpdateInstanceInformation() {
|
|
+ suite.T().Skip("The Nix build sandbox has no interfaces for IP and MAC address reports.");
|
|
// Give mock value to test UpdateInstanceInformation, assert the error is nil, assert the log.Debug function get called.
|
|
response, err := suite.sdkService.UpdateInstanceInformation(suite.logMock, "2.2.3.2", "active", "Amazon-ssm-agent")
|
|
assert.Nil(suite.T(), err, "Err should be nil")
|
|
--
|
|
2.29.2
|
|
|