ocre-cli 0.2.0

Command-line tool for Ocre: create, generate, migrate, run and deploy apps.
1
2
3
4
5
6
7
8
9
10
use super::*;

#[test]
fn bucket_names_fit_r2_limits() {
    assert_eq!(bucket_name("blog"), "blog-storage");
    let long = format!("{}-x", "a".repeat(54));
    let name = bucket_name(&long);
    assert_eq!(name, format!("{}-storage", "a".repeat(54)), "no dash before the suffix");
    assert!(bucket_name(&"b".repeat(63)).len() <= 63);
}