Skip to content

Commit

Permalink
chore: Functional test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Oct 20, 2023
1 parent ada1020 commit 16b926d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SSCAccessControlPermissionSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>0
it[0].replace(' ', '').equals("IdNameDescription")
it[0].replace(' ', '').equals("IdName")
it.any { it.startsWith(" user_manage") }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SSCAccessControlRoleSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>0
it[0].replace(' ', '').equals("IdNameBuiltinAllapplicationroleDescription")
it[0].replace(' ', '').equals("IdNameBuiltinAllapplicationrole")
it.any { it.startsWith(" admin") }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SSCAppSpec extends FcliBaseSpec {
}

def "update"() {
def args = "ssc app update "+versionSupplier.version.appName + " --description updateddescription"
def args = "ssc app update "+versionSupplier.version.appName + " --description updateddescription -o table=name,description"
when:
def result = Fcli.run(args)
then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SSCAppVersionSpec extends FcliBaseSpec {
}

def "updateName"() {
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name updatedVersionName --description updated1"
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name updatedVersionName --description updated1 -o table=name,description"
when:
def result = Fcli.run(args)
then:
Expand All @@ -61,7 +61,7 @@ class SSCAppVersionSpec extends FcliBaseSpec {
}

def "updateNameWithMatchingAppName"() {
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name " + versionSupplier.version.appName + ":updatedVersionName2 --description updated2"
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name " + versionSupplier.version.appName + ":updatedVersionName2 --description updated2 -o table=name,description"
when:
def result = Fcli.run(args)
then:
Expand All @@ -72,7 +72,7 @@ class SSCAppVersionSpec extends FcliBaseSpec {
}

def "updateNameWithMatchingAppNameAndCustomDelimiter"() {
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name " + versionSupplier.version.appName + "|updatedVersionName3 --description updated2 --delim |"
def args = "ssc appversion update " + versionSupplier.version.get("id") + " --name " + versionSupplier.version.appName + "|updatedVersionName3 --description updated2 --delim | -o table=name,description"
when:
def result = Fcli.run(args)
then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SSCIssueFilterSetSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>=2
it[0].replace(" ","").equals("GuidTitleDefaultfiltersetDescription");
it[0].replace(" ","").equals("GuidTitleDefaultfilterset");
it.any { it.contains("Security Auditor View") }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SSCIssueTemplateSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>0
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilenameDescription")
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilename")
it.any { it.startsWith(" PCI") }
}
}
Expand All @@ -50,7 +50,7 @@ class SSCIssueTemplateSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>0
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilenameDescriptionAction")
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilenameAction")
it[1].contains(templateName)

}
Expand Down Expand Up @@ -119,7 +119,7 @@ class SSCIssueTemplateSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()>0
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilenameDescriptionAction")
it[0].replace(' ', '').equals("IdNameInuseDefaulttemplatePublishversionOriginalfilenameAction")
it[1].contains("DELETED")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SSCTokenSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()==2
it[0].replace(' ', '').equals("IdUsernameTypeResttokenApplicationtokenTerminaldateTimeremainingDescription")
it[0].replace(' ', '').equals("IdUsernameTypeResttokenApplicationtokenTerminaldateTimeremaining")
it[1].endsWith("Generated by 'fcli ssc token create' command ");
}
}
Expand All @@ -50,31 +50,31 @@ class SSCTokenSpec extends FcliBaseSpec {
then:
verifyAll(result.stdout) {
size()==2
it[0].replace(' ', '').equals("IdUsernameTypeCreationdateTerminaldateTimeremainingDescription")
it[0].replace(' ', '').equals("IdUsernameTypeCreationdateTerminaldateTimeremaining")
it[1].endsWith("Generated by 'fcli ssc token create' command ");
}
}

def "update"() {
def args = "ssc token update --description=updatedDescription --user=$user --password=$pass ::token::id"
def args = "ssc token update --description=updatedDescription --user=$user --password=$pass ::token::id -o table=id,description"
when:
def result = Fcli.run(args)
then:
verifyAll(result.stdout) {
size()==2
it[0].replace(' ', '').equals("IdUsernameTypeCreationdateTerminaldateTimeremainingDescription")
it[0].replace(' ', '').equals("IdDescription")
it[1].endsWith("updatedDescription ");
}
}

def "verifyUpdated"() {
def args = "ssc token list -q id==#var('token').id --user=$user --password=$pass"
def args = "ssc token list -q id==#var('token').id --user=$user --password=$pass -o table=id,description"
when:
def result = Fcli.run(args)
then:
verifyAll(result.stdout) {
size()==2
it[0].replace(' ', '').equals("IdUsernameTypeCreationdateTerminaldateTimeremainingDescription")
it[0].replace(' ', '').equals("IdDescription")
it[1].endsWith("updatedDescription ");
}
}
Expand Down

0 comments on commit 16b926d

Please sign in to comment.