func TestGetServerByName(t *testing.T) { var ( d *ICSPTest c *icsp.ICSPClient ) if os.Getenv("ICSP_TEST_ACCEPTANCE") == "true" { d, c = getTestDriverA() if c == nil { t.Fatalf("Failed to execute getTestDriver() ") } IcspName := d.Tc.GetTestData(d.Env, "IcspName").(string) expectsIcspName := d.Tc.GetExpectsData(d.Env, "IcspName").(string) data, err := c.GetServerByName(IcspName) assert.NoError(t, err, "GetServerByName threw error -> %s, %+v\n", err, data) assert.Equal(t, expectsIcspName, data.Name, "GetServerByName should return a valid icsp server") } }