Skip to content

Commit e3690b6

Browse files
committed
cleanup
1 parent cd078ed commit e3690b6

File tree

4 files changed

+4
-7
lines changed
  • lib
    • api_run/src
    • bencher_schema/src/model/organization
  • services/cli/src/bencher/sub/organization/organization
  • tasks/test_api/src/task/test

4 files changed

+4
-7
lines changed

lib/api_run/src/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

lib/bencher_schema/src/model/organization/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

services/cli/src/bencher/sub/organization/organization/claim.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(feature = "plus")]
2-
31
use bencher_client::types::JsonNewClaim;
42
use bencher_json::ResourceId;
53

tasks/test_api/src/task/test/seed_test.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const MEASURE_ARG: &str = "--measure";
2121
const MEASURE_SLUG: &str = "screams";
2222

2323
const REPO_NAME: &str = "bencher";
24-
const PROJECT_SLUG_PREFIX: &str = "bencher-2bbe1be-";
2524
const UNCLAIMED_SLUG: &str = "unclaimed";
2625
const 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);

0 commit comments

Comments
 (0)