File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed
bencher_schema/src/model/organization
services/cli/src/bencher/sub/organization/organization
tasks/test_api/src/task/test Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ async fn post_inner(
7272 query_project. try_allowed ( & context. rbac , auth_user, Permission :: Create ) ?;
7373 } else {
7474 return Err ( unauthorized_error ( format ! (
75- "This project ({}) has already been claimed." ,
75+ "This project ({}) has already been claimed. Provide a valid API token (`--token`) to authenticate. " ,
7676 query_project. slug
7777 ) ) ) ;
7878 }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ impl QueryOrganization {
102102 // then the project can not have anonymous reports.
103103 return if query_organization. is_claimed ( conn_lock ! ( context) ) ? {
104104 Err ( unauthorized_error ( format ! (
105- "This project ({project_slug}) has already been claimed."
105+ "This project ({project_slug}) has already been claimed. Provide a valid API token (`--token`) to authenticate. "
106106 ) ) )
107107 } else {
108108 Ok ( query_organization)
Original file line number Diff line number Diff line change 1- #![ cfg( feature = "plus" ) ]
2-
31use bencher_client:: types:: JsonNewClaim ;
42use bencher_json:: ResourceId ;
53
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const MEASURE_ARG: &str = "--measure";
2121const MEASURE_SLUG : & str = "screams" ;
2222
2323const REPO_NAME : & str = "bencher" ;
24- const PROJECT_SLUG_PREFIX : & str = "bencher-2bbe1be-" ;
2524const UNCLAIMED_SLUG : & str = "unclaimed" ;
2625const CLAIMED_SLUG : & str = "claimed" ;
2726
@@ -1398,12 +1397,12 @@ impl SeedTest {
13981397 } else {
13991398 assert_eq ! ( json. project. name. as_ref( ) , REPO_NAME ) ;
14001399 assert ! (
1401- json. project. slug. as_ref( ) . starts_with( PROJECT_SLUG_PREFIX ) ,
1400+ json. project. slug. as_ref( ) . starts_with( REPO_NAME ) ,
14021401 "{json:?}"
14031402 ) ;
14041403 assert_eq ! (
14051404 json. project. slug. as_ref( ) . len( ) ,
1406- PROJECT_SLUG_PREFIX . len( ) + 13
1405+ REPO_NAME . len( ) + 1 + 7 + 1 + 13
14071406 ) ;
14081407 assert_eq ! ( json. project. claimed, None ) ;
14091408 anonymous_project. replace ( json. project ) ;
You can’t perform that action at this time.
0 commit comments