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:860–879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

convert_remote_errorFunction · 0.70

Tested by

no test coverage detected