コード例 #1
0
func TestGetInterconnectTypes(t *testing.T) {
	var (
		c *ov.OVClient
	)
	if os.Getenv("ONEVIEW_TEST_ACCEPTANCE") == "true" {
		_, c = getTestDriverA("test_interconnect_type")
		if c == nil {
			t.Fatalf("Failed to execute getTestDriver() ")
		}
		interconnectTypes, err := c.GetInterconnectTypes("", "")
		assert.NoError(t, err, "GetInterconnectTypes threw error -> %s, %+v\n", err, interconnectTypes)

		interconnectTypes, err = c.GetInterconnectTypes("", "name:asc")
		assert.NoError(t, err, "GetInterconnectTypes name:asc error -> %s, %+v\n", err, interconnectTypes)

	} else {
		_, c = getTestDriverU("test_interconnect_type")
		data, err := c.GetInterconnectTypes("", "")
		assert.Error(t, err, fmt.Sprintf("ALL ok, no error, caught as expected: %s,%+v\n", err, data))
	}
}