File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,6 @@ const validate = (bsConfig, args) => {
132
132
// if parallels specified via arguments validate only arguments
133
133
if ( ! Utils . isUndefined ( args ) && ! Utils . isUndefined ( args . parallels ) && ! Utils . isParallelValid ( args . parallels ) ) reject ( Constants . validationMessages . INVALID_PARALLELS_CONFIGURATION ) ;
134
134
135
- if ( ! Utils . isUndefined ( args ) ) {
136
- if ( ! Utils . isUndefined ( args . username ) && ! Utils . isUndefined ( args . key ) )
137
- reject ( Constants . validationMessages . EMPTY_ARGS . replace ( "<argsNotGiven>" , "Username and Password" ) ) ;
138
- else if ( ! Utils . isUndefined ( args . username ) )
139
- reject ( Constants . validationMessages . EMPTY_ARGS . replace ( "<argsNotGiven>" , "Username" ) ) ;
140
- else if ( ! Utils . isUndefined ( args . key ) )
141
- reject ( Constants . validationMessages . EMPTY_ARGS . replace ( "<argsNotGiven>" , "Password" ) ) ;
142
- }
143
135
// validate if config file provided exists or not when cypress_config_file provided
144
136
// validate the cypressProjectDir key otherwise.
145
137
let cypressConfigFilePath = bsConfig . run_settings . cypressConfigFilePath ;
Original file line number Diff line number Diff line change @@ -37,10 +37,19 @@ const uploadCypressZip = (bsConfig, filePath) => {
37
37
responseData = null
38
38
}
39
39
if ( resp . statusCode != 200 ) {
40
- if ( responseData && responseData [ "error" ] ) {
41
- reject ( responseData [ "error" ] ) ;
42
- } else {
43
- reject ( Constants . userMessages . ZIP_UPLOADER_NOT_REACHABLE ) ;
40
+ if ( resp . statusCode == 401 ) {
41
+ if ( responseData && responseData [ "error" ] ) {
42
+ reject ( responseData [ "error" ] ) ;
43
+ } else {
44
+ reject ( Constants . validationMessages . INVALID_DEFAULT_AUTH_PARAMS ) ;
45
+ }
46
+ }
47
+ else {
48
+ if ( responseData && responseData [ "error" ] ) {
49
+ reject ( responseData [ "error" ] ) ;
50
+ } else {
51
+ reject ( Constants . userMessages . ZIP_UPLOADER_NOT_REACHABLE ) ;
52
+ }
44
53
}
45
54
} else {
46
55
logger . info ( `Uploaded tests successfully (${ responseData . zip_url } )` ) ;
You can’t perform that action at this time.
0 commit comments