-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI now returns and filter test on group name (#321)
* CLI now returns and filter test on group name Signed-off-by: Aashir Siddiqui <[email protected]> * Added validation for group name Signed-off-by: Aashir Siddiqui <[email protected]> * Added unit test Signed-off-by: Aashir Siddiqui <[email protected]> * Added a unit test for checking mutually exclusive flags Signed-off-by: Aashir Siddiqui <[email protected]> * Updated integration tests Signed-off-by: Aashir Siddiqui <[email protected]> * review: Formatting fixes, revert unwanted changes Signed-off-by: Eamonn Mansour <[email protected]> * review: Add group validation, stop erroring out when --age is not given with --group Signed-off-by: Eamonn Mansour <[email protected]> * Restore ecosystem script constants and add group name validation test Signed-off-by: Eamonn Mansour <[email protected]> * Add group to more unit tests Signed-off-by: Eamonn Mansour <[email protected]> * Add group to runs submit output, add runs get --group ecosystem tests Signed-off-by: Eamonn Mansour <[email protected]> * Empty commit to kick off build Signed-off-by: Eamonn Mansour <[email protected]> * Create RunsQuery struct to store run query parameters and get pages of runs Signed-off-by: Eamonn Mansour <[email protected]> * Replace Latin-1 validation for group and secret names with alphanumeric + dashes and underscores Signed-off-by: Eamonn Mansour <[email protected]> * Update role name validation to use common name validation function Signed-off-by: Eamonn Mansour <[email protected]> --------- Signed-off-by: Aashir Siddiqui <[email protected]> Signed-off-by: Eamonn Mansour <[email protected]> Co-authored-by: Eamonn Mansour <[email protected]>
- Loading branch information
Showing
33 changed files
with
757 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package runs | ||
|
||
import ( | ||
"strings" | ||
|
||
galasaErrors "github.com/galasa-dev/cli/pkg/errors" | ||
"github.com/galasa-dev/cli/pkg/utils" | ||
) | ||
|
||
func validateGroupname(groupName string) (string, error) { | ||
var err error | ||
trimmedName := strings.TrimSpace(groupName) | ||
|
||
if trimmedName == "" || !utils.IsNameValid(trimmedName) { | ||
err = galasaErrors.NewGalasaError(galasaErrors.GALASA_ERROR_INVALID_GROUP_NAME_PROVIDED) | ||
} | ||
return trimmedName, err | ||
} |
Oops, something went wrong.