@@ -50,44 +50,23 @@ usage: check_github_repository_owner.sh [OPTION]...
50
50
@test " missing ssh-docs-path" {
51
51
run check_github_repository_owner.sh --github-repository spring-projects/spring-security
52
52
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 ''" ]
54
54
assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
55
55
}
56
56
57
57
@test " invalid ssh-docs-path spring-security/reference" {
58
58
run check_github_repository_owner.sh --github-repository spring-projects/spring-security --ssh-docs-path spring-security/reference
59
59
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'" ]
61
61
assert [ " ${lines[1]} " = ' usage: check_github_repository_owner.sh [OPTION]...' ]
62
62
}
63
63
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"
91
70
}
92
71
93
72
@test " existing project with valid marker file" {
0 commit comments