File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,30 @@ You may press ctrl-c [..]
8787 . run ( ) ;
8888}
8989
90+ #[ cargo_test]
91+ fn credential_provider_auth_failure ( ) {
92+ let _reg = registry:: RegistryBuilder :: new ( )
93+ . http_index ( )
94+ . auth_required ( )
95+ . alternative ( )
96+ . no_configure_token ( )
97+ . credential_provider ( & [ "cargo:token-from-stdout" , "true" ] )
98+ . build ( ) ;
99+
100+ cargo_process ( "install libc --registry=alternative" )
101+ . with_status ( 101 )
102+ . with_stderr_data ( str![ [ r#"
103+ [UPDATING] `alternative` index
104+ [ERROR] token rejected for `alternative`, please run `cargo login --registry alternative`
105+
106+ Caused by:
107+ failed to get successful HTTP response from [..]
108+ body:
109+ [..]
110+ "# ] ] )
111+ . run ( ) ;
112+ }
113+
90114#[ cargo_test]
91115fn basic_unsupported ( ) {
92116 // Non-action commands don't support login/logout.
You can’t perform that action at this time.
0 commit comments