itoolkit 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +13 -8
  2. package/lib/CommandCall.js +2 -16
  3. package/lib/Connection.js +2 -17
  4. package/lib/Deprecated.js +5 -26
  5. package/lib/ProgramCall.js +4 -18
  6. package/lib/itoolkit.js +2 -16
  7. package/lib/transports/httpTransport.js +4 -18
  8. package/lib/transports/idbTransport.js +24 -26
  9. package/lib/transports/odbcTransport.js +16 -16
  10. package/lib/transports/sshTransport.js +5 -20
  11. package/package.json +23 -16
  12. package/.eslintrc.js +0 -13
  13. package/.gitattributes +0 -2
  14. package/.readthedocs.yml +0 -16
  15. package/CHANGELOG.md +0 -195
  16. package/contributors.txt +0 -2
  17. package/test/README.md +0 -46
  18. package/test/functional/CommandCallFunctional.js +0 -79
  19. package/test/functional/ProgramCallFunctional.js +0 -166
  20. package/test/functional/checkObjectExists.js +0 -182
  21. package/test/functional/config.js +0 -35
  22. package/test/functional/deprecated/commandsFunctional.js +0 -99
  23. package/test/functional/deprecated/iDataQueueFunctional.js +0 -104
  24. package/test/functional/deprecated/iNetworkFunctional.js +0 -160
  25. package/test/functional/deprecated/iObjFunctional.js +0 -350
  26. package/test/functional/deprecated/iPgmFunctional.js +0 -140
  27. package/test/functional/deprecated/iProdFunctional.js +0 -161
  28. package/test/functional/deprecated/iSqlFunctional.js +0 -455
  29. package/test/functional/deprecated/iUserSpaceFunctional.js +0 -127
  30. package/test/functional/deprecated/iWorkFunctional.js +0 -236
  31. package/test/functional/iDataQueueFunctional.js +0 -84
  32. package/test/functional/iNetworkFunctional.js +0 -133
  33. package/test/functional/iObjFunctional.js +0 -327
  34. package/test/functional/iProdFunctional.js +0 -135
  35. package/test/functional/iSqlFunctional.js +0 -449
  36. package/test/functional/iUserSpaceFunctional.js +0 -123
  37. package/test/functional/iWorkFunctional.js +0 -219
  38. package/test/unit/CommandCallUnit.js +0 -88
  39. package/test/unit/ConnectionUnit.js +0 -195
  40. package/test/unit/ProgamCallUnit.js +0 -279
  41. package/test/unit/deprecated/commandsUnit.js +0 -88
  42. package/test/unit/deprecated/iConnUnit.js +0 -162
  43. package/test/unit/deprecated/iPgmUnit.js +0 -207
  44. package/test/unit/deprecated/iSqlUnit.js +0 -442
  45. package/test/unit/deprecated/xmlToJsonUnit.js +0 -203
@@ -1,327 +0,0 @@
1
- // Copyright (c) International Business Machines Corp. 2019
2
-
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4
- // associated documentation files (the "Software"), to deal in the Software without restriction,
5
- // including without limitation the rights to use, copy, modify, merge, publish, distribute,
6
- // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7
- // furnished to do so, subject to the following conditions:
8
-
9
- // The above copyright notice and this permission notice shall be included in all copies or
10
- // substantial portions of the Software.
11
-
12
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
13
- // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
-
18
- /* eslint-env mocha */
19
- /* eslint-disable new-cap */
20
-
21
- const { expect } = require('chai');
22
- const { Connection, iObj } = require('../../lib/itoolkit');
23
- const { config, printConfig } = require('./config');
24
-
25
- describe('iObj Functional Tests', () => {
26
- before(() => {
27
- printConfig();
28
- });
29
-
30
- describe('retrUsrAuth', () => {
31
- it('returns uses\'s authority for an object ', (done) => {
32
- const connection = new Connection(config);
33
-
34
- const obj = new iObj(connection);
35
-
36
- obj.retrUsrAuth('*PUBLIC', '*PGM', 'XMLCGI', 'QXMLSERV', (error, output) => {
37
- expect(error).to.equal(null);
38
- expect(output).to.be.an('Object');
39
- expect(output).to.have.a.property('Object_authority_/_Data_authority');
40
- expect(output).to.have.a.property('Authorization_list_management');
41
- expect(output).to.have.a.property('Object_operational');
42
- expect(output).to.have.a.property('Object_management');
43
- expect(output).to.have.a.property('Object_existence');
44
- expect(output).to.have.a.property('Data_read');
45
- expect(output).to.have.a.property('Data_add');
46
- expect(output).to.have.a.property('Data_update');
47
- expect(output).to.have.a.property('Data_delete');
48
- expect(output).to.have.a.property('Authorization_list');
49
- expect(output).to.have.a.property('Authority_source');
50
- expect(output).to.have.a.property('Some_adopted_authority');
51
- expect(output).to.have.a.property('Adopted_object_authority');
52
- expect(output).to.have.a.property('Adopted_authorization_list_management');
53
- expect(output).to.have.a.property('Adopted_object_operational');
54
- expect(output).to.have.a.property('Adopted_object_management');
55
- expect(output).to.have.a.property('Adopted_object_existence');
56
- expect(output).to.have.a.property('Adopted_data_read');
57
- expect(output).to.have.a.property('Adopted_data_add');
58
- expect(output).to.have.a.property('Adopted_data_update');
59
- expect(output).to.have.a.property('Adopted_data_delete');
60
- expect(output).to.have.a.property('Adopted_data_execute');
61
- expect(output).to.have.a.property('Adopted_object_alter');
62
- expect(output).to.have.a.property('Adopted_object_reference');
63
- expect(output).to.have.a.property('Data_execute');
64
- expect(output).to.have.a.property('Object_alter');
65
- expect(output).to.have.a.property('Object_reference');
66
- expect(output).to.have.a.property('ASP_device_name_of_library');
67
- expect(output).to.have.a.property('ASP_device_name_of_object');
68
- expect(output).to.have.a.property('Offset_to_group_information_table');
69
- expect(output).to.have.a.property('Number_of_group_table_entries_returned');
70
- done();
71
- });
72
- });
73
- });
74
-
75
- describe('rtrCmdInfo', () => {
76
- it('returns command info', (done) => {
77
- const connection = new Connection(config);
78
-
79
- const obj = new iObj(connection);
80
-
81
- obj.retrCmdInfo('CRTLIB', '*LIBL', (error, output) => {
82
- expect(error).to.equal(null);
83
- expect(output).to.be.an('Object');
84
- expect(output).to.have.a.property('Command_name');
85
- expect(output).to.have.a.property('Command_library_name');
86
- expect(output).to.have.a.property('Command_processing_program_or_proxy_target_command');
87
- expect(output).to.have.a.property('Command_processing_program\'s_or_proxy_target_command\'s_library_name');
88
- expect(output).to.have.a.property('Source_file_name');
89
- expect(output).to.have.a.property('Source_file_library_name');
90
- expect(output).to.have.a.property('Source_file_member_name');
91
- expect(output).to.have.a.property('Validity_check_program_name');
92
- expect(output).to.have.a.property('Validity_check_program_library_name');
93
- expect(output).to.have.a.property('Mode_information');
94
- expect(output).to.have.a.property('Where_allowed_to_run');
95
- expect(output).to.have.a.property('Allow_limited_user');
96
- expect(output).to.have.a.property('Maximum_positional_parameters');
97
- expect(output).to.have.a.property('Prompt_message_file_name');
98
- expect(output).to.have.a.property('Prompt_message_file_library_name');
99
- expect(output).to.have.a.property('Message_file_name');
100
- expect(output).to.have.a.property('Message_file_library_name');
101
- expect(output).to.have.a.property('Help_panel_group_name');
102
- expect(output).to.have.a.property('Help_panel_group_library_name');
103
- expect(output).to.have.a.property('Help_identifier');
104
- expect(output).to.have.a.property('Search_index_name');
105
- expect(output).to.have.a.property('Search_index_library_name');
106
- expect(output).to.have.a.property('Current_library');
107
- expect(output).to.have.a.property('Product_library');
108
- expect(output).to.have.a.property('Prompt_override_program_name');
109
- expect(output).to.have.a.property('Prompt_override_program_library_name');
110
- expect(output).to.have.a.property('Restricted_to_target_release');
111
- expect(output).to.have.a.property('Text_description');
112
- expect(output).to.have.a.property('Command_processing_program_call_state');
113
- expect(output).to.have.a.property('Validity_check_program_call_state');
114
- expect(output).to.have.a.property('Prompt_override_program_call_state');
115
- expect(output).to.have.a.property('Offset_to_help_bookshelf_information');
116
- expect(output).to.have.a.property('Length_of_help_bookshelf_information');
117
- expect(output).to.have.a.property('Coded_character_set_ID_(CCSID)');
118
- expect(output).to.have.a.property('Enabled_for_GUI_indicator');
119
- expect(output).to.have.a.property('Threadsafe_indicator');
120
- expect(output).to.have.a.property('Multithreaded_job_action');
121
- expect(output).to.have.a.property('Proxy_command_indicator');
122
- expect(output).to.have.a.property('Prompt_message_file_text_indicator');
123
- done();
124
- });
125
- });
126
- });
127
-
128
- describe('retrPgmInfo', () => {
129
- it('returns program info', (done) => {
130
- const connection = new Connection(config);
131
-
132
- const obj = new iObj(connection);
133
-
134
- obj.retrPgmInfo('XMLCGI', 'QXMLSERV', (error, output) => {
135
- expect(error).to.equal(null);
136
- expect(output).to.be.an('Object');
137
- expect(output).to.have.a.property('Program_name');
138
- expect(output).to.have.a.property('Program_library_name');
139
- expect(output).to.have.a.property('Program_owner');
140
- expect(output).to.have.a.property('Program_attribute');
141
- expect(output).to.have.a.property('Creation_date_and_time');
142
- expect(output).to.have.a.property('Source_file_name');
143
- expect(output).to.have.a.property('Source_file_library_name');
144
- expect(output).to.have.a.property('Source_file_member_name');
145
- expect(output).to.have.a.property('Source_file_updated_date_and_time');
146
- expect(output).to.have.a.property('Observable_information');
147
- expect(output).to.have.a.property('User_profile_option');
148
- expect(output).to.have.a.property('Use_adopted_authority');
149
- expect(output).to.have.a.property('Log_commands');
150
- expect(output).to.have.a.property('Allow_RTVCLSRC');
151
- expect(output).to.have.a.property('Fix_decimal_data');
152
- expect(output).to.have.a.property('Text_description');
153
- expect(output).to.have.a.property('Type_of_program');
154
- expect(output).to.have.a.property('Teraspace_storage-enabled_program');
155
- expect(output).to.have.a.property('Minimum_number_of_parameters');
156
- expect(output).to.have.a.property('Maximum_number_of_parameters');
157
- expect(output).to.have.a.property('Program_size');
158
- expect(output).to.have.a.property('Associated_space_size');
159
- expect(output).to.have.a.property('Static_storage_size');
160
- expect(output).to.have.a.property('Automatic_storage_size');
161
- expect(output).to.have.a.property('Number_of_MI_instructions');
162
- expect(output).to.have.a.property('Number_of_MI_ODT_entries');
163
- expect(output).to.have.a.property('Program_state');
164
- expect(output).to.have.a.property('Compiler_identification');
165
- expect(output).to.have.a.property('Earliest_release_program_can_run');
166
- expect(output).to.have.a.property('Sort_sequence_table_name');
167
- expect(output).to.have.a.property('Sort_sequence_table_library_name');
168
- expect(output).to.have.a.property('Language_identifier');
169
- expect(output).to.have.a.property('Program_domain');
170
- expect(output).to.have.a.property('Conversion_required');
171
- expect(output).to.have.a.property('Conversion_details');
172
- expect(output).to.have.a.property('Optimization');
173
- expect(output).to.have.a.property('Paging_pool');
174
- expect(output).to.have.a.property('Update_program_automatic_storage_area_(PASA)');
175
- expect(output).to.have.a.property('Clear_program_automatic_storage_area_(PASA)');
176
- expect(output).to.have.a.property('Paging_amount');
177
- expect(output).to.have.a.property('Program_entry_procedure_module');
178
- expect(output).to.have.a.property('Program_entry_procedure_module_library');
179
- expect(output).to.have.a.property('Activation_group_attribute');
180
- expect(output).to.have.a.property('Observable_information_compressed');
181
- expect(output).to.have.a.property('Run-time_information_compressed');
182
- expect(output).to.have.a.property('Release_program_created_on');
183
- expect(output).to.have.a.property('Shared_activation_group');
184
- expect(output).to.have.a.property('Allow_update');
185
- expect(output).to.have.a.property('Program_CCSID');
186
- expect(output).to.have.a.property('Number_of_modules');
187
- expect(output).to.have.a.property('Number_of_service_programs');
188
- expect(output).to.have.a.property('Number_of_copyrights');
189
- expect(output).to.have.a.property('Number_of_unresolved_references');
190
- expect(output).to.have.a.property('Release_program_created_for');
191
- expect(output).to.have.a.property('Allow_static_storage_reinitialization');
192
- expect(output).to.have.a.property('All_creation_data');
193
- expect(output).to.have.a.property('Allow_bound_*SRVPGM_library_name_update');
194
- expect(output).to.have.a.property('Profiling_data');
195
- expect(output).to.have.a.property('Teraspace_storage_enabled_modules');
196
- expect(output).to.have.a.property('Storage_model');
197
- expect(output).to.have.a.property('Uses_argument_optimization_(ARGOPT)');
198
- done();
199
- });
200
- });
201
- });
202
-
203
- describe('retrSrvPgmInfo', () => {
204
- it('returns service program info', (done) => {
205
- const connection = new Connection(config);
206
-
207
- const obj = new iObj(connection);
208
-
209
- obj.retrSrvPgmInfo('QZSRVSSL', 'QHTTPSVR', (error, output) => {
210
- expect(error).to.equal(null);
211
- expect(output).to.be.an('Object');
212
- expect(output).to.have.a.property('Service_program_name');
213
- expect(output).to.have.a.property('Service_program_name');
214
- expect(output).to.have.a.property('Service_program_owner');
215
- expect(output).to.have.a.property('Service_program_attribute');
216
- expect(output).to.have.a.property('Creation_date_and_time');
217
- expect(output).to.have.a.property('Export_source_file_name');
218
- expect(output).to.have.a.property('Export_source_file_library_name');
219
- expect(output).to.have.a.property('Export_source_file_member_name');
220
- expect(output).to.have.a.property('Activation_group_attribute');
221
- expect(output).to.have.a.property('Current_export_signature');
222
- expect(output).to.have.a.property('User_profile');
223
- expect(output).to.have.a.property('Observable_information_compressed');
224
- expect(output).to.have.a.property('Run-time_information_compressed');
225
- expect(output).to.have.a.property('Run-time_information_compressed');
226
- expect(output).to.have.a.property('Service_program_CCSID');
227
- expect(output).to.have.a.property('Number_of_modules');
228
- expect(output).to.have.a.property('Number_of_service_programs');
229
- expect(output).to.have.a.property('Number_of_copyrights');
230
- expect(output).to.have.a.property('Text_description');
231
- expect(output).to.have.a.property('Shared_activation_group');
232
- expect(output).to.have.a.property('Allow_update');
233
- expect(output).to.have.a.property('Number_of_unresolved_references');
234
- expect(output).to.have.a.property('Use_adopted_authority');
235
- expect(output).to.have.a.property('Allow_bound_*SRVPGM_library_name_update');
236
- expect(output).to.have.a.property('Profiling_data');
237
- expect(output).to.have.a.property('Teraspace_storage_enabled_modules');
238
- expect(output).to.have.a.property('Storage_model');
239
- expect(output).to.have.a.property('Uses_argument_optimization_(ARGOPT)');
240
- expect(output).to.have.a.property('Service_program_state');
241
- expect(output).to.have.a.property('Service_program_domain');
242
- expect(output).to.have.a.property('Associated_space_size');
243
- expect(output).to.have.a.property('Static_storage_size');
244
- expect(output).to.have.a.property('Service_program_size');
245
- expect(output).to.have.a.property('Release_service_program_created_on');
246
- expect(output).to.have.a.property('Earliest_release_service_program_can_run');
247
- expect(output).to.have.a.property('Release_service_program_created_for');
248
- expect(output).to.have.a.property('Allow_static_storage_reinitialization');
249
- expect(output).to.have.a.property('Conversion_required');
250
- expect(output).to.have.a.property('All_creation_data');
251
- expect(output).to.have.a.property('Conversion_details');
252
- expect(output).to.have.a.property('Paging_pool');
253
- expect(output).to.have.a.property('Paging_amount');
254
- done();
255
- });
256
- });
257
- });
258
-
259
- describe('retrUserInfo', () => {
260
- it('returns specified user profile info', (done) => {
261
- const connection = new Connection(config);
262
-
263
- const obj = new iObj(connection);
264
-
265
- obj.retrUserInfo('QSYS', (error, output) => {
266
- expect(error).to.equal(null);
267
- expect(output).to.be.an('Object');
268
- expect(output).to.have.a.property('User_profile_name');
269
- expect(output).to.have.a.property('Previous_sign-on_date_and_time');
270
- expect(output).to.have.a.property('Sign-on_attempts_not_valid');
271
- expect(output).to.have.a.property('Status');
272
- expect(output).to.have.a.property('Password_change_date');
273
- expect(output).to.have.a.property('No_password_indicator');
274
- expect(output).to.have.a.property('Password_expiration_interval');
275
- expect(output).to.have.a.property('Date_password_expires');
276
- expect(output).to.have.a.property('Days_until_password_expires');
277
- expect(output).to.have.a.property('Set_password_to_expire');
278
- expect(output).to.have.a.property('Display_sign-on_information');
279
- expect(output).to.have.a.property('Local_password_management');
280
- expect(output).to.have.a.property('Block_password_change');
281
- done();
282
- });
283
- });
284
- });
285
-
286
- describe('retrUsrAuthToObj', () => {
287
- it(`retrieves info for users who are authorized to an object using ${config.transport} transpsort`, (done) => {
288
- const connection = new Connection(config);
289
-
290
- const obj = new iObj(connection);
291
-
292
- obj.retrUserAuthToObj('/home', (error, output) => {
293
- expect(error).to.equal(null);
294
- expect(output).to.be.an('Object');
295
- expect(output).to.have.a.property('Profile_name');
296
- expect(output).to.have.a.property('User_or_group_indicator');
297
- expect(output).to.have.a.property('Data_authority');
298
- expect(output).to.have.a.property('Authorization_list_management');
299
- expect(output).to.have.a.property('Object_management');
300
- expect(output).to.have.a.property('Object_existence');
301
- expect(output).to.have.a.property('Object_alter');
302
- expect(output).to.have.a.property('Object_reference');
303
- expect(output).to.have.a.property('Object_operational');
304
- expect(output).to.have.a.property('Data_read');
305
- expect(output).to.have.a.property('Data_add');
306
- expect(output).to.have.a.property('Data_update');
307
- expect(output).to.have.a.property('Data_delete');
308
- expect(output).to.have.a.property('Data_execute');
309
- done();
310
- });
311
- });
312
- });
313
-
314
- describe('addToLibraryList', () => {
315
- it('appends lib to user\'s lib list', (done) => {
316
- const connection = new Connection(config);
317
-
318
- const obj = new iObj(connection);
319
-
320
- obj.addToLibraryList('QHTTPSVR', (error, output) => {
321
- expect(error).to.equal(null);
322
- expect(output).to.be.a('boolean').and.to.equal(true);
323
- done();
324
- });
325
- });
326
- });
327
- });
@@ -1,135 +0,0 @@
1
- // Copyright (c) International Business Machines Corp. 2019
2
-
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4
- // associated documentation files (the "Software"), to deal in the Software without restriction,
5
- // including without limitation the rights to use, copy, modify, merge, publish, distribute,
6
- // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7
- // furnished to do so, subject to the following conditions:
8
-
9
- // The above copyright notice and this permission notice shall be included in all copies or
10
- // substantial portions of the Software.
11
-
12
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
13
- // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
-
18
- /* eslint-env mocha */
19
- /* eslint-disable new-cap */
20
-
21
- const { expect } = require('chai');
22
- const { Connection, iProd } = require('../../lib/itoolkit');
23
- const { config, printConfig } = require('./config');
24
-
25
- describe('iProd Functional Tests', () => {
26
- before(() => {
27
- printConfig();
28
- });
29
-
30
- describe('getPTFInfo', () => {
31
- it('returns info for specified ptf', (done) => {
32
- const connection = new Connection(config);
33
-
34
- const prod = new iProd(connection);
35
-
36
- prod.getPTFInfo('SI67726', (error, ptf) => {
37
- expect(error).to.equal(null);
38
- expect(ptf).to.be.an('Object');
39
- expect(ptf).to.have.a.property('Product_ID');
40
- expect(ptf).to.have.a.property('PTF_ID');
41
- expect(ptf).to.have.a.property('Release_level');
42
- expect(ptf).to.have.a.property('Product_option');
43
- expect(ptf).to.have.a.property('Load_ID');
44
- expect(ptf).to.have.a.property('Loaded_status');
45
- expect(ptf).to.have.a.property('Cover_letter_status');
46
- expect(ptf).to.have.a.property('On-order_status');
47
- expect(ptf).to.have.a.property('Save_file_status');
48
- expect(ptf).to.have.a.property('File_name');
49
- expect(ptf).to.have.a.property('File_library_name');
50
- expect(ptf).to.have.a.property('PTF_type');
51
- expect(ptf).to.have.a.property('IPL_action');
52
- expect(ptf).to.have.a.property('Action_pending');
53
- expect(ptf).to.have.a.property('Action_required');
54
- expect(ptf).to.have.a.property('PTF_is_released');
55
- expect(ptf).to.have.a.property('Target_release');
56
- expect(ptf).to.have.a.property('Superseding_PTF');
57
- expect(ptf).to.have.a.property('Current_IPL_source');
58
- expect(ptf).to.have.a.property('Minimum_level');
59
- expect(ptf).to.have.a.property('Maximum_level');
60
- expect(ptf).to.have.a.property('Format_information_available');
61
- expect(ptf).to.have.a.property('Status_date_and_time');
62
- expect(ptf).to.have.a.property('Licensed_Internal_Code_group');
63
- expect(ptf).to.have.a.property('Superseded_by_PTF_ID');
64
- expect(ptf).to.have.a.property('Current_server_IPL_source');
65
- expect(ptf).to.have.a.property('Server_IPL_required');
66
- expect(ptf).to.have.a.property('Creation_date_and_time');
67
- expect(ptf).to.have.a.property('Technology_refresh_PTF');
68
- done();
69
- });
70
- });
71
- });
72
-
73
- describe('getProductInfo', () => {
74
- it('returns info for specified product', (done) => {
75
- const connection = new Connection(config);
76
-
77
- const prod = new iProd(connection);
78
-
79
- prod.getProductInfo('5770DG1', (error, product) => {
80
- expect(error).to.equal(null);
81
- expect(product).to.be.an('Object');
82
- expect(product).to.have.a.property('Product_ID');
83
- expect(product).to.have.a.property('Release_level');
84
- expect(product).to.have.a.property('Product_option');
85
- expect(product).to.have.a.property('Load_ID');
86
- expect(product).to.have.a.property('Symbolic_load_state');
87
- expect(product).to.have.a.property('Load_error_indicator');
88
- expect(product).to.have.a.property('Load_state');
89
- expect(product).to.have.a.property('Supported_flag');
90
- expect(product).to.have.a.property('Registration_type');
91
- expect(product).to.have.a.property('Registration_value');
92
- expect(product).to.have.a.property('Offset_to_additional_information');
93
- expect(product).to.have.a.property('Primary_language_load_identifier');
94
- expect(product).to.have.a.property('Minimum_target_release');
95
- expect(product).to.have.a.property('Minimum_VRM_of_*BASE_required_by_option');
96
- expect(product).to.have.a.property('Requirements_met_between_base_and_option_value');
97
- expect(product).to.have.a.property('Level');
98
- done();
99
- });
100
- });
101
- });
102
-
103
- // REST transport currently failing with 414 URI Too Long response code
104
- // The requested URL's length exceeds the capacity limit for this server
105
- describe('getInstalledProducts', () => {
106
- // eslint-disable-next-line func-names
107
- it('returns info for installed products', (done) => {
108
- const connection = new Connection(config);
109
-
110
- const prod = new iProd(connection);
111
-
112
- prod.getInstalledProducts((error, products) => {
113
- expect(error).to.equal(null);
114
- expect(products).to.be.an('Array');
115
- expect(products.length).to.be.greaterThan(0);
116
-
117
- products.forEach((product) => {
118
- expect(product).to.be.an('Object');
119
- expect(product).to.have.a.property('Product_ID');
120
- expect(product).to.have.a.property('Product_option');
121
- expect(product).to.have.a.property('Release_level');
122
- expect(product).to.have.a.property('Description_text_message_ID');
123
- expect(product).to.have.a.property('Description_text_object_name');
124
- expect(product).to.have.a.property('Description_text_library_name');
125
- expect(product).to.have.a.property('Installed_flag');
126
- expect(product).to.have.a.property('Supported_flag');
127
- expect(product).to.have.a.property('Registration_type');
128
- expect(product).to.have.a.property('Registration_value');
129
- expect(product).to.have.a.property('Description_text');
130
- });
131
- done();
132
- });
133
- });
134
- });
135
- });