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 [..]
87
87
. run ( ) ;
88
88
}
89
89
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
+
90
114
#[ cargo_test]
91
115
fn basic_unsupported ( ) {
92
116
// Non-action commands don't support login/logout.
You can’t perform that action at this time.
0 commit comments