func()

in tui/mock.go [354:383]


func (m mock) ProjectCreate(project, parent, parentType string) error {
	m.delay()
	if m.forceErr {
		return errForced
	}
	if len(project) > 32 {
		return gcloud.ErrorProjectCreateTooLong
	}

	if len(project) < 6 {
		return gcloud.ErrorProjectCreateTooLong
	}

	if strings.Contains(project, "!") {
		return gcloud.ErrorProjectInvalidCharacters
	}

	list, _ := m.ProjectList()

	for _, v := range list {
		if v.ID == project {
			return gcloud.ErrorProjectAlreadyExists
		}
		if v.Name == project {
			return gcloud.ErrorProjectAlreadyExists
		}
	}

	return nil
}