// implement create server unt test
//TODO: This test requires a server profile to have been created
func TestCreateServer(t *testing.T) {
	var (
		d              *ICSPTest
		c              *icsp.ICSPClient
		user, pass, ip string
	)
	if os.Getenv("ICSP_TEST_ACCEPTANCE") == "true" {
		user = os.Getenv("ONEVIEW_ILO_USER")
		pass = os.Getenv("ONEVIEW_ILO_PASSWORD")
		d, c = getTestDriverA()
		if c == nil {
			t.Fatalf("Failed to execute getTestDriver() ")
		}
		ip = d.Tc.GetTestData(d.Env, "IloIPAddress").(string)
		serialNumber := d.Tc.GetTestData(d.Env, "FreeBladeSerialNumber").(string)
		log.Debug("implements acceptance test for TestCreateServer")
		s, err := c.GetServerBySerialNumber(serialNumber) // fake serial number
		assert.NoError(t, err, "GetServerBySerialNumber fake threw error -> %s, %+v\n", err, s)
		if os.Getenv("ONEVIEW_TEST_PROVISION") != "true" {
			log.Info("env ONEVIEW_TEST_PROVISION != true for TestCreateServer")
			log.Infof("Skipping test create for : %s, %s", serialNumber, ip)
			return
		}
		if s.URI.IsNil() {
			// create the server
			err := c.CreateServer(user, pass, ip, 443)
			assert.NoError(t, err, "CreateServer threw error -> %s\n", err)
		} else {
			// create the server
			err := c.CreateServer(user, pass, ip, 443)
			assert.Error(t, err, "CreateServer should throw conflict error  -> %s\n", err)
		}
		// check if the server now exist
	} else {
		_, c = getTestDriverU()
		log.Debug("implements unit test for TestCreateServer")
		err := c.CreateServer("foo", "bar", "127.0.0.1", 443)
		assert.Error(t, err, "CreateServer should throw error  -> %s\n", err)
	}
}