@@ -50,44 +50,23 @@ usage: check_github_repository_owner.sh [OPTION]...
5050@test " missing ssh-docs-path" {
5151 run check_github_repository_owner.sh --github-repository spring-projects/spring-security
5252 assert [ " $status " -eq 1 ]
53- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got ''" ]
53+ assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with and not equal / but got ''" ]
5454 assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
5555}
5656
5757@test " invalid ssh-docs-path spring-security/reference" {
5858 run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path spring-security/reference
5959 assert [ " $status " -eq 1 ]
60- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got 'spring-security/reference'" ]
60+ assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with and not equal / but got 'spring-security/reference'" ]
6161 assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
6262}
6363
64- @test " invalid ssh-docs-path /reference" {
65- run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path /reference
66- assert [ " $status " -eq 1 ]
67- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got '/reference'" ]
68- assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
69- }
70-
71- @test " invalid ssh-docs-path //reference" {
72- run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path //reference
73- assert [ " $status " -eq 1 ]
74- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got '//reference'" ]
75- assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
76- }
77-
78-
79- @test " invalid ssh-docs-path /spring-securityreference" {
80- run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path /spring-securityreference
81- assert [ " $status " -eq 1 ]
82- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got '/spring-securityreference'" ]
83- assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
84- }
85-
86- @test " invalid ssh-docs-path /spring-security" {
87- run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path /spring-security
88- assert [ " $status " -eq 1 ]
89- assert [ " ${lines[0]} " = " Error: '--ssh-docs-path' must start with / and end with /reference but got '/spring-security'" ]
90- assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
64+ # https://github.com/spring-io/spring-doc-actions/issues/20
65+ @test " Allow httpdocs-path that does not end in /reference" {
66+ local dir=" ${BATS_RESOURCE_TEMP_DIR} /antora"
67+ run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path " $dir "
68+ assert_success
69+ assert_output " Owner is verified"
9170}
9271
9372@test " existing project with valid marker file" {
0 commit comments