Skip to content

Commit

Permalink
PR Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oshratZairi committed Nov 20, 2024
1 parent bb380a4 commit 7df8c5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func TestReleaseBundleCreationFromArtifactsWithoutSigningKey(t *testing.T) {
testReleaseBundleCreation(t, tests.UploadDevSpec, tests.LifecycleArtifacts, tests.GetExpectedLifecycleCreationByArtifacts(), withoutSigningKey)
}

func testReleaseBundleCreation(t *testing.T, uploadSpec, creationSpec string, expected []string, withoutKey bool) {
if withoutKey {
func testReleaseBundleCreation(t *testing.T, uploadSpec, creationSpec string, expected []string, withoutSigningKey bool) {
if withoutSigningKey {
cleanCallback := initLifecycleTest(t, signingKeyOptionalArtifactoryMinVersion)
defer cleanCallback()
} else {
Expand All @@ -114,7 +114,7 @@ func testReleaseBundleCreation(t *testing.T, uploadSpec, creationSpec string, ex
assert.NoError(t, err)
runRt(t, "upload", "--spec="+specFile)

createRbFromSpec(t, creationSpec, tests.LcRbName1, number1, true, withoutKey)
createRbFromSpec(t, creationSpec, tests.LcRbName1, number1, true, withoutSigningKey)
defer deleteReleaseBundle(t, lcManager, tests.LcRbName1, number1)

assertRbArtifacts(t, lcManager, tests.LcRbName1, number1, expected)
Expand Down Expand Up @@ -209,21 +209,21 @@ func createRbBackwardCompatible(t *testing.T, specName, sourceOption, rbName, rb
createRb(t, specFile, sourceOption, rbName, rbVersion, sync, false)
}

func createRbFromSpec(t *testing.T, specName, rbName, rbVersion string, sync bool, withoutKey bool) {
func createRbFromSpec(t *testing.T, specName, rbName, rbVersion string, sync bool, withoutSigningKey bool) {
specFile, err := tests.CreateSpec(specName)
assert.NoError(t, err)
createRb(t, specFile, "spec", rbName, rbVersion, sync, withoutKey)
createRb(t, specFile, "spec", rbName, rbVersion, sync, withoutSigningKey)
}

func createRb(t *testing.T, specFilePath, sourceOption, rbName, rbVersion string, sync bool, withoutKey bool) {
func createRb(t *testing.T, specFilePath, sourceOption, rbName, rbVersion string, sync bool, withoutSigningKey bool) {
argsAndOptions := []string{
"rbc",
rbName,
rbVersion,
getOption(sourceOption, specFilePath),
}

if !withoutKey {
if !withoutSigningKey {
argsAndOptions = append(argsAndOptions, getOption(cliutils.SigningKey, gpgKeyPairName))
}
// Add the --sync option only if requested, to test the default value.
Expand Down
2 changes: 1 addition & 1 deletion utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ var flagsMap = map[string]cli.Flag{
},
lcSigningKey: cli.StringFlag{
Name: SigningKey,
Usage: "[Optional] The GPG/RSA key-pair name given in Artifactory. If not provided will create/use the default one` `",
Usage: "[Optional] The GPG/RSA key-pair name given in Artifactory. If the key isn't provided, the command creates or uses the default key.` `",
},
lcPathMappingPattern: cli.StringFlag{
Name: PathMappingPattern,
Expand Down

0 comments on commit 7df8c5c

Please sign in to comment.