github.com/mponton/terratest@v0.44.0/modules/azure/networkinterface_test.go (about)

     1  //go:build azure || (azureslim && network)
     2  // +build azure azureslim,network
     3  
     4  // NOTE: We use build tags to differentiate azure testing because we currently do not have azure access setup for
     5  // CircleCI.
     6  
     7  package azure
     8  
     9  import (
    10  	"testing"
    11  
    12  	"github.com/stretchr/testify/require"
    13  )
    14  
    15  /*
    16  The below tests are currently stubbed out, with the expectation that they will throw errors.
    17  If/when methods can be mocked or Create/Delete APIs are added, these tests can be extended.
    18  */
    19  
    20  func TestGetNetworkInterfaceE(t *testing.T) {
    21  	t.Parallel()
    22  
    23  	nicName := ""
    24  	rgName := ""
    25  	subID := ""
    26  
    27  	_, err := GetNetworkInterfaceE(nicName, rgName, subID)
    28  
    29  	require.Error(t, err)
    30  }
    31  
    32  func TestGetNetworkInterfacePrivateIPsE(t *testing.T) {
    33  	t.Parallel()
    34  
    35  	nicName := ""
    36  	rgName := ""
    37  	subID := ""
    38  
    39  	_, err := GetNetworkInterfacePrivateIPsE(nicName, rgName, subID)
    40  
    41  	require.Error(t, err)
    42  }
    43  
    44  func TestGetNetworkInterfacePublicIPsE(t *testing.T) {
    45  	t.Parallel()
    46  
    47  	nicName := ""
    48  	rgName := ""
    49  	subID := ""
    50  
    51  	_, err := GetNetworkInterfacePublicIPsE(nicName, rgName, subID)
    52  
    53  	require.Error(t, err)
    54  }
    55  
    56  func TestNetworkInterfaceExistsE(t *testing.T) {
    57  	t.Parallel()
    58  
    59  	nicName := ""
    60  	rgName := ""
    61  	subID := ""
    62  
    63  	_, err := NetworkInterfaceExistsE(nicName, rgName, subID)
    64  
    65  	require.Error(t, err)
    66  }