MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_convert_view_not_found

Function test_convert_view_not_found

atomic-cli/src/commands/push/helpers.rs:858–877  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

856
857 #[test]
858 fn test_convert_view_not_found() {
859 // The server returns 404 both for a genuinely-missing view and for a
860 // private one the caller can't see. On a push (a write that needs
861 // auth) the message must name the view *and* explain that this may be
862 // an auth/authorization problem, with the remedy to run identity
863 // register — not the misleading "view not found".
864 let err = RemoteError::view_not_found("main");
865 let cli_err = convert_remote_error(err, "http://example.com");
866
867 match cli_err {
868 CliError::RemoteError { message, .. } => {
869 let lower = message.to_lowercase();
870 assert!(message.contains("main"));
871 assert!(message.contains("not found"));
872 assert!(lower.contains("authenticated") || lower.contains("authorized"));
873 assert!(message.contains("atomic identity register"));
874 }
875 _ => panic!("Expected RemoteError"),
876 }
877 }
878
879 #[test]
880 fn test_convert_missing_deps() {

Callers

nothing calls this directly

Calls 1

convert_remote_errorFunction · 0.70

Tested by

no test coverage detected